From 9f514d8c7d6eb44109b324d76c709d6d51610f15 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 12 Jan 2011 07:50:12 +0100 Subject: [PATCH] Avoid a traceback on remove_contact: --- src/roster.py | 6 ++++-- 1 file 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): """