[sugar] [PATCH] services/presence/server_plugin.py: Ensure _conn always exists (even if None)

Dan Williams dcbw
Tue May 22 12:24:04 EDT 2007


On Mon, 2007-05-21 at 12:20 +0100, Simon McVittie wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> This means cleanup() will not fail on an uninitialized server plugin,
> and get_connection() will return None rather than raising AttributeError.

Obviously fine...

> - ---
>  services/presence/server_plugin.py |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/services/presence/server_plugin.py b/services/presence/server_plugin.py
> index d4930c9..daa31aa 100644
> - --- a/services/presence/server_plugin.py
> +++ b/services/presence/server_plugin.py
> @@ -125,6 +125,7 @@ class ServerPlugin(gobject.GObject):
>          """
>          gobject.GObject.__init__(self)
>  
> +        self._conn = None
>          self._icon_cache = BuddyIconCache()
>  
>          self._registry = registry
> - -- 
> 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
> 
> iD8DBQFGUYCFWSc8zVUw7HYRAhdDAJ9om5h3LWS0XML644khlW4/N0vE9ACfWSSP
> KOQHUbxQxc9SbFGibtxXgr4=
> =5llQ
> -----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