1
0
mirror of https://github.com/gryf/wicd.git synced 2026-04-14 09:33:33 +02:00

Create an error dialog when we get a DBus access denied error.

This commit is contained in:
Dan O'Reilly
2009-03-08 20:38:54 -04:00
parent 4365a8406b
commit 5170411595
2 changed files with 7 additions and 1 deletions

View File

@@ -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.