diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-01-12 07:50:12 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-01-12 07:50:12 +0100 |
commit | 9f514d8c7d6eb44109b324d76c709d6d51610f15 (patch) | |
tree | f561c6587346af2959a98ff4fd2a90d66236dad7 | |
parent | 1a448192696539eff781f234e1e633056a27a75b (diff) | |
download | poezio-9f514d8c7d6eb44109b324d76c709d6d51610f15.tar.gz poezio-9f514d8c7d6eb44109b324d76c709d6d51610f15.tar.bz2 poezio-9f514d8c7d6eb44109b324d76c709d6d51610f15.tar.xz poezio-9f514d8c7d6eb44109b324d76c709d6d51610f15.zip |
Avoid a traceback on remove_contact:
-rw-r--r-- | src/roster.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/roster.py b/src/roster.py index a299ba12..97975d33 100644 --- a/src/roster.py +++ b/src/roster.py @@ -199,8 +199,10 @@ class RosterGroup(object): """ Remove a Contact object from the list """ - assert isinstance(contact, Contact) - self._contacts.remove(contact) + try: + self._contacts.remove(contact) + except ValueError: + pass def add_contact(self, contact): """ |