1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-21 13:28:08 +01:00

wicd-curses: catch unhandled exception when automatically starting the wicd daemon fails

This commit is contained in:
Tom Van Braeckel
2014-12-19 11:52:22 +01:00
parent 6fdfc518a8
commit 04dd18bed9

View File

@@ -1247,14 +1247,19 @@ def setup_dbus(force=True):
except DBusException:
print >> sys.stderr, \
_("Can't connect to the daemon, trying to start it automatically...")
bus = dbusmanager.get_bus()
dbus_ifaces = dbusmanager.get_dbus_ifaces()
daemon = dbus_ifaces['daemon']
wireless = dbus_ifaces['wireless']
wired = dbus_ifaces['wired']
try:
bus = dbusmanager.get_bus()
dbus_ifaces = dbusmanager.get_dbus_ifaces()
daemon = dbus_ifaces['daemon']
wireless = dbus_ifaces['wireless']
wired = dbus_ifaces['wired']
except DBusException:
print >> sys.stderr, \
_("Can't automatically start the daemon, this error is fatal...")
if not daemon:
print 'Error connecting to wicd via D-Bus. ' \
print 'Error connecting to wicd via D-Bus. ' \
'Please make sure the wicd service is running.'
sys.exit(3)