X-Git-Url: http://git.maemo.org/git/?p=theonering;a=blobdiff_plain;f=src%2Fsimple_presence.py;h=bda9fedce112fdfd2a86b6175083d20ae189a398;hp=9c7f64ead1db64ebdf214b8d240b27fc1e039a52;hb=887113c5927f329599cc7044c7b689d1134f0dac;hpb=23240fb33222aed0e374e541432e54af7445b8b3 diff --git a/src/simple_presence.py b/src/simple_presence.py index 9c7f64e..bda9fed 100644 --- a/src/simple_presence.py +++ b/src/simple_presence.py @@ -2,13 +2,13 @@ import logging import telepathy -import gtk_toolbox +import util.misc as misc_utils import tp import handle import gvoice.state_machine as state_machine -_moduleLogger = logging.getLogger("simple_presence") +_moduleLogger = logging.getLogger(__name__) 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: - presence = TheOneRingPresence.ONLINE + presence = TheOneRingPresence.AWAY presenceType = TheOneRingPresence.TO_PRESENCE_TYPE[presence] presences[h] = (presenceType, presence) @@ -98,7 +98,7 @@ class SimplePresenceMixin(tp.ConnectionInterfaceSimplePresence, TheOneRingPresen {'Statuses' : self._get_statuses} ) - @gtk_toolbox.log_exception(_moduleLogger) + @misc_utils.log_exception(_moduleLogger) 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() ) - @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")