projects
/
theonering
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a155f41
)
Cleaned up presence and cleaned up the exceptions
author
Ed Page
<eopage@byu.net>
Thu, 26 Nov 2009 04:18:23 +0000
(22:18 -0600)
committer
Ed Page
<eopage@byu.net>
Thu, 26 Nov 2009 04:18:23 +0000
(22:18 -0600)
src/simple_presence.py
patch
|
blob
|
history
diff --git
a/src/simple_presence.py
b/src/simple_presence.py
index
56b81af
..
29deb88
100644
(file)
--- a/
src/simple_presence.py
+++ b/
src/simple_presence.py
@@
-34,6
+34,13
@@
class SimplePresenceMixin(telepathy.server.ConnectionInterfaceSimplePresence):
"""
raise NotImplementedError()
"""
raise NotImplementedError()
+ @property
+ def handle(self):
+ """
+ @abstract
+ """
+ raise NotImplementedError("Abstract property called")
+
@gtk_toolbox.log_exception(_moduleLogger)
def GetPresences(self, contacts):
"""
@gtk_toolbox.log_exception(_moduleLogger)
def GetPresences(self, contacts):
"""
@@
-55,14
+62,15
@@
class SimplePresenceMixin(telepathy.server.ConnectionInterfaceSimplePresence):
@gtk_toolbox.log_exception(_moduleLogger)
def SetPresence(self, status, message):
if message:
@gtk_toolbox.log_exception(_moduleLogger)
def SetPresence(self, status, message):
if message:
- raise telepathy.errors.InvalidArgument
+ raise telepathy.errors.InvalidArgument("Messages aren't supported")
if status == TheOneRingPresence.ONLINE:
self.gvoice_backend.mark_dnd(True)
elif status == TheOneRingPresence.BUSY:
if status == TheOneRingPresence.ONLINE:
self.gvoice_backend.mark_dnd(True)
elif status == TheOneRingPresence.BUSY:
+ raise telepathy.errors.NotAvailable("DnD support not yet added to TheOneRing")
self.gvoice_backend.mark_dnd(False)
else:
self.gvoice_backend.mark_dnd(False)
else:
- raise telepathy.errors.InvalidArgument
+ raise telepathy.errors.InvalidArgument("Unsupported status: %r" % status)
_moduleLogger.info("Setting Presence to '%s'" % status)
_moduleLogger.info("Setting Presence to '%s'" % status)