From: Mark Wooding Date: Thu, 28 Sep 2017 17:53:32 +0000 (+0100) Subject: svc/conntrack.in: Write debug trace if we fail to attach to DBus services. X-Git-Tag: 1.5.0~114 X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/commitdiff_plain/bd9bd714ada289532a4dac46fd0573413a57bb64?hp=0f0cfd6d935d979db5f8af200fee0394441c4bd5 svc/conntrack.in: Write debug trace if we fail to attach to DBus services. --- diff --git a/svc/conntrack.in b/svc/conntrack.in index 95a46867..23fc45d6 100644 --- a/svc/conntrack.in +++ b/svc/conntrack.in @@ -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)