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

Simon McVittie simon.mcvittie at collabora.co.uk
Thu May 24 07:48:46 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- ---
 services/presence/presenceservice.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/services/presence/presenceservice.py b/services/presence/presenceservice.py
index 0c8a2a5..a439372 100644
- --- a/services/presence/presenceservice.py
+++ b/services/presence/presenceservice.py
@@ -303,9 +303,10 @@ class PresenceService(ExportedGObject):
                 ret.append(buddy.object_path())
         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):
- -        key = psutils.bytes_to_string(key)
         if self._buddies.has_key(key):
             buddy = self._buddies[key]
             if buddy.props.valid:
- -- 
1.5.2-rc3.GIT

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: OpenPGP key: http://www.pseudorandom.co.uk/2003/contact/ or pgp.net

iD8DBQFGVXueWSc8zVUw7HYRAuNiAKDcizeX8ubVytd43AX0ZI0fX6QjCACgoJBy
RWUdbbtmdXzb+9+3kstw8mo=
=V7N0
-----END PGP SIGNATURE-----


More information about the Sugar mailing list