Reducing duplicate error reports and making note of why an error may occur
authorEd Page <eopage@byu.net>
Fri, 26 Feb 2010 02:53:35 +0000 (20:53 -0600)
committerEd Page <eopage@byu.net>
Fri, 26 Feb 2010 02:53:35 +0000 (20:53 -0600)
src/autogv.py
src/util/tp_utils.py

index 346f48c..57c9a37 100644 (file)
@@ -1,5 +1,6 @@
 import logging
 
 import logging
 
+import dbus
 import telepathy
 
 try:
 import telepathy
 
 try:
@@ -107,7 +108,6 @@ class RefreshVoicemail(object):
 
                self._isStarted = False
 
 
                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
        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)
                        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
                )
                missDetection = telepathy_utils.WasMissedCall(
                        bus, conn, chan, self._on_missed_call, self._on_error_for_missed
                )
index ae9250a..712e642 100644 (file)
@@ -128,9 +128,12 @@ class NewChannelSignaller(object):
        ):
                connObjectPath = channel_path_to_conn_path(channelObjectPath)
                serviceName = path_to_service_name(channelObjectPath)
        ):
                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):
 
 
 def channel_path_to_conn_path(channelObjectPath):