diff options
author | Dan Williams <dcbw@redhat.com> | 2006-10-20 17:15:23 (GMT) |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2006-10-20 17:15:23 (GMT) |
commit | 1226b0b6b957f70b7885535b1f0213ed7072dc9a (patch) | |
tree | 508a285c4d6e16c866ab0bbb9aa79666778ffa89 /sugar | |
parent | fe448938b1a9792250e0bd9a75f0eda4fcd793a5 (diff) |
Fix Buddy object's get_service_of_type() method
This call would always fail for activity services because the
dbus bindings for it did not pass in the activity at all. Fix
that.
Diffstat (limited to 'sugar')
-rw-r--r-- | sugar/presence/Buddy.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sugar/presence/Buddy.py b/sugar/presence/Buddy.py index 6751c7c..579592b 100644 --- a/sugar/presence/Buddy.py +++ b/sugar/presence/Buddy.py @@ -172,9 +172,12 @@ class Buddy(gobject.GObject): else: return None - def get_service_of_type(self, stype): + def get_service_of_type(self, stype, activity=None): try: - object_path = self._buddy.getServiceOfType(stype) + act_op = "/" + if activity: + act_op = activity.object_path() + object_path = self._buddy.getServiceOfType(stype, act_op) except dbus.exceptions.DBusException: return None return self._ps_new_object(object_path) |