mirror of
https://github.com/sailfishos/ofono
synced 2025-11-30 22:51:06 +08:00
test: Make exceptions compatible with Python 3
Use "except Type as var" syntax to work with both Python >= 2.6 and Python 3.
This commit is contained in:
committed by
Denis Kenzior
parent
0c1fcd2b50
commit
0393a41e35
@@ -33,7 +33,7 @@ for path, properties in modems:
|
||||
|
||||
try:
|
||||
context.SetProperty(sys.argv[2], sys.argv[3])
|
||||
except dbus.DBusException, e:
|
||||
except dbus.DBusException as e:
|
||||
print("Error setting context %s property %s: %s" %\
|
||||
(path, sys.argv[2], str(e)))
|
||||
exit(2)
|
||||
|
||||
Reference in New Issue
Block a user