[sugar] [PATCH] services/presence/buddy.py: Don't allow the Owner to disappear, even if they have no handles left

Dan Williams dcbw at redhat.com
Thu May 24 13:44:40 EDT 2007


On Tue, 2007-05-22 at 16:48 +0100, Simon McVittie wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> - ---
>  services/presence/buddy.py |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Obviously correct

> diff --git a/services/presence/buddy.py b/services/presence/buddy.py
> index eb072a1..90b000e 100644
> - --- a/services/presence/buddy.py
> +++ b/services/presence/buddy.py
> @@ -266,7 +266,8 @@ class Buddy(ExportedGObject):
>              del self.handles[tp_client]
>              self.TelepathyHandleRemoved(conn.service_name, conn.object_path,
>                                          handle)
> - -            if not self.handles:
> +            # the Owner can't disappear - that would be silly
> +            if not self.handles and not self._owner:
>                  self.emit('disappeared')
>          else:
>              _logger.debug('Telepathy handle %u supposedly removed, but '
> - -- 
> 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
> 
> iD8DBQFGUxDLWSc8zVUw7HYRAuM5AJkBGWkTob1/MQ18vNiOJEtIhQObnACdFdYa
> /3VmpW9LN5TVQ97590YDkLM=
> =GORN
> -----END PGP SIGNATURE-----
> _______________________________________________
> Sugar mailing list
> Sugar at laptop.org
> http://mailman.laptop.org/mailman/listinfo/sugar



More information about the Sugar mailing list