add a debug message when we cannot load idle module
This commit is contained in:
parent
10e4ea7ee9
commit
328327d5c5
|
@ -18,12 +18,13 @@
|
||||||
|
|
||||||
import time
|
import time
|
||||||
from string import find, lower
|
from string import find, lower
|
||||||
|
from common import gajim
|
||||||
|
|
||||||
|
|
||||||
STATE_UNKNOWN = "OS probably not supported"
|
STATE_UNKNOWN = 'OS probably not supported'
|
||||||
STATE_XAWAY = "extanted away"
|
STATE_XAWAY = 'extanted away'
|
||||||
STATE_AWAY = "away"
|
STATE_AWAY = 'away'
|
||||||
STATE_AWAKE = "awake"
|
STATE_AWAKE = 'awake'
|
||||||
|
|
||||||
SUPPORTED = 1
|
SUPPORTED = 1
|
||||||
try:
|
try:
|
||||||
|
@ -32,6 +33,7 @@ except:
|
||||||
try:
|
try:
|
||||||
import idle # when Gajim is installed
|
import idle # when Gajim is installed
|
||||||
except:
|
except:
|
||||||
|
gajim.log.debug('Unable to load idle module')
|
||||||
SUPPORTED = 0
|
SUPPORTED = 0
|
||||||
|
|
||||||
class Sleepy:
|
class Sleepy:
|
||||||
|
@ -64,9 +66,3 @@ class Sleepy:
|
||||||
|
|
||||||
def setState(self,val):
|
def setState(self,val):
|
||||||
self.state = val
|
self.state = val
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
s = Sleepy(10)
|
|
||||||
while s.poll():
|
|
||||||
print "state is %s" % s.getState()
|
|
||||||
time.sleep(5)
|
|
||||||
|
|
Loading…
Reference in New Issue