diff options
author | Krzysztof Klinikowski <kkszysiu@gmail.com> | 2010-05-11 19:03:06 +0200 |
---|---|---|
committer | Krzysztof Klinikowski <kkszysiu@gmail.com> | 2010-05-11 19:03:06 +0200 |
commit | 9143849364ee47de1b7b4575fa0a3dd513ba25a2 (patch) | |
tree | 166d40c9fd952d82013f7a59fe72b4927fa94111 | |
parent | 3c6e4af83134ea09b7bc312641d1b27febd5ab0f (diff) |
Dont throw error when user had two contacts with identical UIN. Just pass it ignoring one.
-rwxr-xr-x | sunshine/lqsoft/pygadu/models.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sunshine/lqsoft/pygadu/models.py b/sunshine/lqsoft/pygadu/models.py index ced5dbe..51bf8c9 100755 --- a/sunshine/lqsoft/pygadu/models.py +++ b/sunshine/lqsoft/pygadu/models.py @@ -75,8 +75,8 @@ class GaduProfile(object): def addContact(self, contact): if self.__contacts.has_key(contact.uin): - raise ValueError("Contact with UIN %d already exists." % 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) @@ -242,9 +242,7 @@ class Def(object): def mkdef(*args): return Def(*args) - class FlatXMLObject(object): - def __init__(self, **kwargs): for (k, v) in self.SCHEMA.iteritems(): if v.required and not kwargs.has_key(k): |