diff --git a/wicd/translations.py b/wicd/translations.py index 397236c..98c3ac7 100644 --- a/wicd/translations.py +++ b/wicd/translations.py @@ -160,6 +160,7 @@ language['cannot_start_daemon'] = _('Unable to connect to wicd daemon DBus inter "This typically means there was a problem starting the daemon. " + \ "Check the wicd log for more info') language['lost_dbus'] = _('The wicd daemon has shut down, the UI will not function properly until it is restarted.') +language['access_denied'] = _("Unable to contact the wicd dameon due to an access denied error from DBus. Please check your DBus configuration.") language['configuring_wireless'] = _('Configuring preferences for wireless network "$A" ($B)') language['configuring_wired'] = _('Configuring preferences for wired profile "$A"') language['scan'] = _('Scan') diff --git a/wicd/wicd-client.py b/wicd/wicd-client.py index f82dd08..8cac87e 100755 --- a/wicd/wicd-client.py +++ b/wicd/wicd-client.py @@ -79,7 +79,11 @@ def catchdbus(func): try: return func(*args, **kwargs) except DBusException, e: - print "warning: ignoring exception %s" % e + if "DBus.Error.AccessDenied" in e: + error(None, language['access_denied']) + raise DBusException(e) + else: + print "warning: ignoring exception %s" % e return None wrapper.__name__ = func.__name__ wrapper.__module__ = func.__module__ @@ -693,6 +697,7 @@ def handle_no_dbus(): block=False)) return False +@catchdbus def main(argv): """ The main frontend program.