summaryrefslogtreecommitdiff
path: root/sunshine
diff options
context:
space:
mode:
authorKrzysztof Klinikowski <kkszysiu@gmail.com>2010-05-11 21:29:45 +0200
committerKrzysztof Klinikowski <kkszysiu@gmail.com>2010-05-11 21:29:45 +0200
commit536e0c209c86dafba586042b4d91dd22e4f27aeb (patch)
tree67c631b0cd7cf620cc53b8ce93850863c2584e09 /sunshine
parent9143849364ee47de1b7b4575fa0a3dd513ba25a2 (diff)
Better implementation.
Diffstat (limited to 'sunshine')
-rwxr-xr-xsunshine/lqsoft/pygadu/models.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/sunshine/lqsoft/pygadu/models.py b/sunshine/lqsoft/pygadu/models.py
index 51bf8c9..c571793 100755
--- a/sunshine/lqsoft/pygadu/models.py
+++ b/sunshine/lqsoft/pygadu/models.py
@@ -74,12 +74,14 @@ class GaduProfile(object):
self.__connection.loseConnection()
def addContact(self, contact):
- if self.__contacts.has_key(contact.uin):
+ #if self.__contacts.has_key(contact.uin):
#raise ValueError("Contact with UIN %d already exists." % contact.uin)
#now we just leave that contact and go to next one
- self.__contacts[contact.uin] = contact
- if self.connected:
- self.setNotifyState(contact.uin, contact.notify_flags)
+ #pass
+ if not self.__contacts.has_key(contact.uin):
+ self.__contacts[contact.uin] = contact
+ if self.connected:
+ self.setNotifyState(contact.uin, contact.notify_flags)
def removeContact(self, contact, notify=False):
if self.__contacts.has_key(contact.uin):