mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 04:48:00 +01:00
Updated wicd-curses to use DBusException.get_dbus_name() instead of the exception arguments.
This commit is contained in:
@@ -1049,11 +1049,11 @@ setup_dbus()
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
parser = OptionParser(version="wicd-curses-%s (using wicd %s)" % (CURSES_REV,daemon.Hello()))
|
parser = OptionParser(version="wicd-curses-%s (using wicd %s)" % (CURSES_REV,daemon.Hello()))
|
||||||
except Exception as ex:
|
except Exception as e:
|
||||||
if "Rejected send message" in ex.args[0]:
|
if "DBus.Error.AccessDenied" in e.get_dbus_name():
|
||||||
print ""
|
print ""
|
||||||
system("\
|
system("\
|
||||||
echo ERROR: wicd-curses was denied access to the wicd daemon, make sure that \
|
echo ERROR: wicd-curses was denied access to the wicd daemon, please check that \
|
||||||
your user is in the group \\'$(tput bold)$(tput setaf 4)"+ wpath.wicd_group+"$(tput sgr0)\\'.")
|
your user is in the group \\'$(tput bold)$(tput setaf 4)"+ wpath.wicd_group+"$(tput sgr0)\\'.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user