Avoid a traceback on remove_contact:

This commit is contained in:
Florent Le Coz 2011-01-12 07:50:12 +01:00
parent 1a44819269
commit 9f514d8c7d

View file

@ -199,8 +199,10 @@ class RosterGroup(object):
"""
Remove a Contact object from the list
"""
assert isinstance(contact, Contact)
try:
self._contacts.remove(contact)
except ValueError:
pass
def add_contact(self, contact):
"""