[sugar] [PATCH] services/presence/server_plugin: make bytes_to_string() unnecessary by requesting a dbus.ByteArray
Dan Williams
dcbw
Thu May 24 13:51:21 EDT 2007
On Thu, 2007-05-24 at 12:48 +0100, Simon McVittie wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> - ---
> services/presence/server_plugin.py | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
Looks good
> diff --git a/services/presence/server_plugin.py b/services/presence/server_plugin.py
> index cfa1819..97f06a8 100644
> - --- a/services/presence/server_plugin.py
> +++ b/services/presence/server_plugin.py
> @@ -739,15 +739,13 @@ class ServerPlugin(gobject.GObject):
> self._contact_offline(handle)
> return
>
> - - # Convert key from dbus byte array to python string
> - - props["key"] = psutils.bytes_to_string(props["key"])
> - -
> self._conn[CONN_INTERFACE_ALIASING].RequestAliases([handle],
> reply_handler=lambda *args: self._contact_online_aliases_cb(handle, props, *args),
> error_handler=lambda e: self._contact_online_aliases_error_cb(handle, props, True, e))
>
> def _contact_online_request_properties(self, handle, tries):
> self._conn[CONN_INTERFACE_BUDDY_INFO].GetProperties(handle,
> + byte_arrays=True,
> reply_handler=lambda *args: self._contact_online_properties_cb(handle, *args),
> error_handler=lambda e: self._contact_online_properties_error_cb(handle, tries, e))
> return False
> - --
> 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
>
> iD8DBQFGVXuLWSc8zVUw7HYRAjKrAKCZYtxTKTLLNqS7qZTfzcBdDsTjvACgwi+H
> MTjvx8OaMRHfSk5ISt6CBgc=
> =7ypw
> -----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