From ecddbf102cb0a26d02712f41740c1c16c12c7d0f Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 25 Feb 2010 20:53:35 -0600 Subject: [PATCH] Reducing duplicate error reports and making note of why an error may occur --- src/autogv.py | 8 ++++++-- src/util/tp_utils.py | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/autogv.py b/src/autogv.py index 346f48c..57c9a37 100644 --- a/src/autogv.py +++ b/src/autogv.py @@ -1,5 +1,6 @@ import logging +import dbus import telepathy try: @@ -107,7 +108,6 @@ class RefreshVoicemail(object): self._isStarted = False - @misc_utils.log_exception(_moduleLogger) def _on_new_channel(self, bus, serviceName, connObjectPath, channelObjectPath, channelType): if channelType != telepathy.interfaces.CHANNEL_TYPE_STREAMED_MEDIA: return @@ -118,7 +118,11 @@ class RefreshVoicemail(object): return conn = telepathy.client.Connection(serviceName, connObjectPath) - chan = telepathy.client.Channel(serviceName, channelObjectPath) + try: + chan = telepathy.client.Channel(serviceName, channelObjectPath) + except dbus.exceptions.UnknownMethodException: + _moduleLogger.exception("Client might not have implemented a deprecated method") + return missDetection = telepathy_utils.WasMissedCall( bus, conn, chan, self._on_missed_call, self._on_error_for_missed ) diff --git a/src/util/tp_utils.py b/src/util/tp_utils.py index ae9250a..712e642 100644 --- a/src/util/tp_utils.py +++ b/src/util/tp_utils.py @@ -128,9 +128,12 @@ class NewChannelSignaller(object): ): connObjectPath = channel_path_to_conn_path(channelObjectPath) serviceName = path_to_service_name(channelObjectPath) - self._on_user_new_channel( - self._sessionBus, serviceName, connObjectPath, channelObjectPath, channelType - ) + try: + self._on_user_new_channel( + self._sessionBus, serviceName, connObjectPath, channelObjectPath, channelType + ) + except Exception: + _moduleLogger.exception("Blocking exception from being passed up") def channel_path_to_conn_path(channelObjectPath): -- 1.7.9.5