From 2d0b9d08a07e9aaca50dc04eb52571f872570cdf Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 08 Aug 2008 13:57:19 +0000 Subject: catch the InvalidHandle exception and not InspectHandles (too fast completion error...) --- diff --git a/src/telepathy_plugin.py b/src/telepathy_plugin.py index 3344361..25bbd1c 100644 --- a/src/telepathy_plugin.py +++ b/src/telepathy_plugin.py @@ -364,7 +364,7 @@ class TelepathyPlugin(gobject.GObject): try: jid = self._conn[CONN_INTERFACE].InspectHandles(handle_type, [handle]) - except (InvalidArgument, InspectHandles): + except (InvalidArgument, InvalidHandle): continue else: jids.append(jid[0]) @@ -393,7 +393,7 @@ class TelepathyPlugin(gobject.GObject): try: jids = self._conn[CONN_INTERFACE].InspectHandles( HANDLE_TYPE_CONTACT, relevant) - except (InvalidArgument, InspectHandles): + except (InvalidArgument, InvalidHandle): # InspectHandles failed so discard invalid handles by trying to # inspect them one by one. # FIXME: the Contacts interface should offer a proper way to do this. -- cgit v0.9.1