From 94e02277f35ea98b32de7271d3bed5996c5f6fda Mon Sep 17 00:00:00 2001 From: Andrew Psaltis Date: Fri, 19 Jun 2009 18:48:39 -0400 Subject: [PATCH] Updated wicd-curses to use DBusException.get_dbus_name() instead of the exception arguments. --- curses/wicd-curses.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/curses/wicd-curses.py b/curses/wicd-curses.py index fdce9ce..b06202a 100755 --- a/curses/wicd-curses.py +++ b/curses/wicd-curses.py @@ -1049,11 +1049,11 @@ setup_dbus() if __name__ == '__main__': try: parser = OptionParser(version="wicd-curses-%s (using wicd %s)" % (CURSES_REV,daemon.Hello())) - except Exception as ex: - if "Rejected send message" in ex.args[0]: + except Exception as e: + if "DBus.Error.AccessDenied" in e.get_dbus_name(): print "" 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)\\'.") sys.exit(1) else: