[Sugar-devel] [PATCH] Make sure we don't change the owner's colors because of a network event #2348

Sascha Silbe sascha-ml-reply-to-2010-3 at silbe.org
Mon Sep 20 16:45:34 EDT 2010


Excerpts from Tomeu Vizoso's message of Mon Sep 20 14:55:28 +0200 2010:

> ---
>  src/jarabe/model/neighborhood.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py
> index b808e12..76a0a7d 100644
> --- a/src/jarabe/model/neighborhood.py
> +++ b/src/jarabe/model/neighborhood.py
> @@ -829,7 +829,7 @@ class Neighborhood(gobject.GObject):
>  
>      def __buddy_updated_cb(self, account, contact_id, properties):
>          logging.debug('__buddy_updated_cb %r', contact_id)
> -        if contact_id not in self._buddies:
> +        if contact_id is None or contact_id not in self._buddies:
>              logging.debug('__buddy_updated_cb Unknown buddy with contact_id %r',
>                            contact_id)
>              return


I guess this is the correct change, but we should note exactly when
contact_id is None and why we simply ignore that case. At least to me
it isn't obvious from the code. It feels strange to receive an "update"
for Buddy <None>.

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
Url : http://lists.sugarlabs.org/archive/sugar-devel/attachments/20100920/71c646ff/attachment-0001.pgp 


More information about the Sugar-devel mailing list