chiark / gitweb /
svc/conntrack.in: Write debug trace if we fail to attach to DBus services.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 28 Sep 2017 17:53:32 +0000 (18:53 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 14 Jun 2018 09:34:25 +0000 (10:34 +0100)
svc/conntrack.in

index 95a46867602b6105ff99acdb39cf18c24d12056f..23fc45d6f82005f10700538df637a2af329c7037 100644 (file)
@@ -380,8 +380,8 @@ class NetworkManagerMonitor (object):
         netupdown(True, ['nm', 'initially-connected'])
       else:
         netupdown(False, ['nm', 'initially-disconnected'])
-    except D.DBusException:
-      pass
+    except D.DBusException, e:
+      if T._debug: print '# exception attaching to network-manager: %s' % e
     bus.add_signal_receiver(me._nm_state, 'StateChanged',
                             NM_IFACE, NM_NAME, NM_PATH)
     bus.add_signal_receiver(me._nm_connchange, 'PropertiesChanged',
@@ -420,8 +420,8 @@ class ConnManMonitor (object):
       props = cm.GetProperties(dbus_interface = CM_IFACE)
       state = props['State']
       netupdown(state == 'online', ['connman', 'initially-%s' % state])
-    except D.DBusException:
-      pass
+    except D.DBusException, e:
+      if T._debug: print '# exception attaching to connman: %s' % e
     bus.add_signal_receiver(me._cm_state, 'PropertyChanged',
                             CM_IFACE, CM_NAME, CM_PATH)
 
@@ -459,7 +459,8 @@ class MaemoICdMonitor (object):
       except D.DBusException:
         me._iap = None
         netupdown(False, ['icd', 'initially-disconnected'])
-    except D.DBusException:
+    except D.DBusException, e:
+      if T._debug: print '# exception attaching to icd: %s' % e
       me._iap = None
     bus.add_signal_receiver(me._icd_state, 'status_changed', ICD_IFACE,
                             ICD_NAME, ICD_PATH)