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

Dan Williams dcbw
Thu May 24 13:51:35 EDT 2007


On Thu, 2007-05-24 at 12:48 +0100, Simon McVittie wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> - ---
>  services/presence/presenceservice.py |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)

OK

> 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-----
> _______________________________________________
> Sugar mailing list
> Sugar at laptop.org
> http://mailman.laptop.org/mailman/listinfo/sugar




More information about the Sugar-devel mailing list