services/presence/presenceservice: Make bytes_to_string() unnecessary by requesting a ByteArray from dbus-python

This commit is contained in:
Simon McVittie 2007-05-24 11:21:21 +01:00
parent c3e54133a4
commit 43453124bd

View File

@ -303,9 +303,10 @@ class PresenceService(ExportedGObject):
ret.append(buddy.object_path()) ret.append(buddy.object_path())
return ret return ret
@dbus.service.method(_PRESENCE_INTERFACE, in_signature="ay", out_signature="o") @dbus.service.method(_PRESENCE_INTERFACE,
in_signature="ay", out_signature="o",
byte_arrays=True)
def GetBuddyByPublicKey(self, key): def GetBuddyByPublicKey(self, key):
key = psutils.bytes_to_string(key)
if self._buddies.has_key(key): if self._buddies.has_key(key):
buddy = self._buddies[key] buddy = self._buddies[key]
if buddy.props.valid: if buddy.props.valid: