projects
/
theonering
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding support for coroutines for async ops through trampolines
[theonering]
/
src
/
simple_presence.py
diff --git
a/src/simple_presence.py
b/src/simple_presence.py
index
9c7f64e
..
bda9fed
100644
(file)
--- a/
src/simple_presence.py
+++ b/
src/simple_presence.py
@@
-2,13
+2,13
@@
import logging
import telepathy
import telepathy
-import gtk_toolbox
+import util.misc as misc_utils
import tp
import handle
import gvoice.state_machine as state_machine
import tp
import handle
import gvoice.state_machine as state_machine
-_moduleLogger = logging.getLogger("simple_presence")
+_moduleLogger = logging.getLogger(__name__)
class TheOneRingPresence(object):
class TheOneRingPresence(object):
@@
-66,7
+66,7
@@
class TheOneRingPresence(object):
raise telepathy.errors.InvalidArgument("Unsupported state on the state machine: %s" % state)
presenceType = TheOneRingPresence.TO_PRESENCE_TYPE[presence]
else:
raise telepathy.errors.InvalidArgument("Unsupported state on the state machine: %s" % state)
presenceType = TheOneRingPresence.TO_PRESENCE_TYPE[presence]
else:
- presence = TheOneRingPresence.ONLINE
+ presence = TheOneRingPresence.AWAY
presenceType = TheOneRingPresence.TO_PRESENCE_TYPE[presence]
presences[h] = (presenceType, presence)
presenceType = TheOneRingPresence.TO_PRESENCE_TYPE[presence]
presences[h] = (presenceType, presence)
@@
-98,7
+98,7
@@
class SimplePresenceMixin(tp.ConnectionInterfaceSimplePresence, TheOneRingPresen
{'Statuses' : self._get_statuses}
)
{'Statuses' : self._get_statuses}
)
- @gtk_toolbox.log_exception(_moduleLogger)
+ @misc_utils.log_exception(_moduleLogger)
def GetPresences(self, contacts):
"""
@return {ContactHandle: (Status, Presence Type, Message)}
def GetPresences(self, contacts):
"""
@return {ContactHandle: (Status, Presence Type, Message)}
@@
-109,7
+109,7
@@
class SimplePresenceMixin(tp.ConnectionInterfaceSimplePresence, TheOneRingPresen
for (h, (presenceType, presence)) in self.get_presences(contacts).iteritems()
)
for (h, (presenceType, presence)) in self.get_presences(contacts).iteritems()
)
- @gtk_toolbox.log_exception(_moduleLogger)
+ @misc_utils.log_exception(_moduleLogger)
def SetPresence(self, status, message):
if message:
raise telepathy.errors.InvalidArgument("Messages aren't supported")
def SetPresence(self, status, message):
if message:
raise telepathy.errors.InvalidArgument("Messages aren't supported")