From bd9bd714ada289532a4dac46fd0573413a57bb64 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Thu, 28 Sep 2017 18:53:32 +0100 Subject: [PATCH] svc/conntrack.in: Write debug trace if we fail to attach to DBus services. Organization: Straylight/Edgeware From: Mark Wooding --- svc/conntrack.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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) -- [mdw]