Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2008-08-06 11:09:16 (GMT)
committer Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>2008-08-06 11:09:16 (GMT)
commit9dbbe3312db0e44751b31e92f1a94fe2cc3c56e3 (patch)
treea5eefcb874fafc1e71e83e14899220f5039d3519
parent5ac88cdf45eb824054a992fa100be300737d4b78 (diff)
only catch InvalidArgument and InspectHandles exceptions when calling inspect_handles_one_by_one
-rw-r--r--src/telepathy_plugin.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/telepathy_plugin.py b/src/telepathy_plugin.py
index 295a447..792dc45 100644
--- a/src/telepathy_plugin.py
+++ b/src/telepathy_plugin.py
@@ -35,6 +35,7 @@ from telepathy.interfaces import (CONN_INTERFACE, CHANNEL_TYPE_TEXT,
CONN_INTERFACE_PRESENCE, CONN_INTERFACE_AVATARS,
CONN_INTERFACE_ALIASING, CHANNEL_TYPE_CONTACT_LIST,
CONN_MGR_INTERFACE)
+from telepathy.errors import (InvalidArgument, InvalidHandle)
import psutils
@@ -363,7 +364,7 @@ class TelepathyPlugin(gobject.GObject):
try:
jid = self._conn[CONN_INTERFACE].InspectHandles(handle_type,
[handle])
- except DBusException:
+ except (InvalidArgument, InspectHandles):
continue
else:
jids.append(jid[0])
@@ -392,7 +393,7 @@ class TelepathyPlugin(gobject.GObject):
try:
jids = self._conn[CONN_INTERFACE].InspectHandles(
HANDLE_TYPE_CONTACT, relevant)
- except DBusException:
+ except (InvalidArgument, InspectHandles):
# InspectHandles failed so discard invalid handles by trying to
# inspect them one by one.
# FIXME: the Inspectotron should offer a proper way to do this.