summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-01-12 07:50:12 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-01-12 07:50:12 +0100
commit9f514d8c7d6eb44109b324d76c709d6d51610f15 (patch)
treef561c6587346af2959a98ff4fd2a90d66236dad7 /src
parent1a448192696539eff781f234e1e633056a27a75b (diff)
downloadpoezio-9f514d8c7d6eb44109b324d76c709d6d51610f15.tar.gz
poezio-9f514d8c7d6eb44109b324d76c709d6d51610f15.tar.bz2
poezio-9f514d8c7d6eb44109b324d76c709d6d51610f15.tar.xz
poezio-9f514d8c7d6eb44109b324d76c709d6d51610f15.zip
Avoid a traceback on remove_contact:
Diffstat (limited to 'src')
-rw-r--r--src/roster.py6
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):
"""