On 06/26/2011 03:19 PM, Simon Schampijer wrote:
We do add ourself to the model by default. When we are connected
to the server it often gives us as well ourself back.

Signed-off-by: Simon Schampijer<si...@laptop.org>
---
  src/jarabe/model/neighborhood.py |    5 +++++
  1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py
index 9a2852a..96cbb36 100644
--- a/src/jarabe/model/neighborhood.py
+++ b/src/jarabe/model/neighborhood.py
@@ -594,6 +594,11 @@ class _Account(gobject.GObject):
          for handle in attributes.keys():
              nick = attributes[handle][CONNECTION_INTERFACE_ALIASING + 
'/alias']

+            if handle == self._self_handle:
+                logging.debug('_Account.__get_contact_attributes_cb,' \
+                              ' do not add ourself %r', handle)
+                continue
+
              if handle in self._buddy_handles and \
                      not self._buddy_handles[handle] is None:
                  logging.debug('Got handle %r with nick %r, going to update',

Tested-by: Samuel Greenfeld <greenf...@laptop.org>

Sam did test this one as working.

Regards,
   Simon
_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to