From eb16219265210deed3f029aa19f4aef0efd44ce0 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 21 Feb 2007 07:08:40 -0500 Subject: [PATCH] raise errors, not return them --- services/presence2/presenceservice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/presence2/presenceservice.py b/services/presence2/presenceservice.py index 3a632870..923a6d44 100644 --- a/services/presence2/presenceservice.py +++ b/services/presence2/presenceservice.py @@ -57,7 +57,7 @@ class PresenceService(dbus.service.Object): @dbus.service.method(_PRESENCE_INTERFACE, in_signature="s", out_signature="o") def GetActivityById(self, actid): - return NotFoundError("The activity was not found.") + raise NotFoundError("The activity was not found.") @dbus.service.method(_PRESENCE_INTERFACE, out_signature="ao") def GetBuddies(self): @@ -65,15 +65,15 @@ class PresenceService(dbus.service.Object): @dbus.service.method(_PRESENCE_INTERFACE, in_signature="ay", out_signature="o") def GetBuddyByPublicKey(self, key): - return NotFoundError("The buddy was not found.") + raise NotFoundError("The buddy was not found.") @dbus.service.method(_PRESENCE_INTERFACE, out_signature="o") def GetOwner(self): - return NotFoundError("The owner was not found.") + raise NotFoundError("The owner was not found.") @dbus.service.method(_PRESENCE_INTERFACE, in_signature="sssa{sv}", out_signature="o") def ShareActivity(self, actid, atype, name, properties): - return NotImplemented("not implemented yet") + raise NotImplementedError("not implemented yet") def main():