mirror of
https://github.com/gryf/wicd.git
synced 2025-12-23 06:37:59 +01:00
Restore python 2.5 compatibility in both clients.
This commit is contained in:
@@ -1049,7 +1049,7 @@ 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 e:
|
except Exception, e:
|
||||||
if "DBus.Error.AccessDenied" in e.get_dbus_name():
|
if "DBus.Error.AccessDenied" in e.get_dbus_name():
|
||||||
print language['access_denied_wc'].replace('$A','\033[1;34m'+wpath.wicd_group+'\033[0m')
|
print language['access_denied_wc'].replace('$A','\033[1;34m'+wpath.wicd_group+'\033[0m')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ def catchdbus(func):
|
|||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
try:
|
try:
|
||||||
return func(*args, **kwargs)
|
return func(*args, **kwargs)
|
||||||
except DBusException as e:
|
except DBusException, e:
|
||||||
if e.get_dbus_name() != None and "DBus.Error.AccessDenied" in e.get_dbus_name():
|
if e.get_dbus_name() != None and "DBus.Error.AccessDenied" in e.get_dbus_name():
|
||||||
error(None, language['access_denied'])
|
error(None, language['access_denied'])
|
||||||
#raise
|
#raise
|
||||||
|
|||||||
Reference in New Issue
Block a user