diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2014-03-11 17:39:19 +0100 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2014-03-11 19:32:46 -0500 |
commit | 0393a41e3589380b701dc73fc15fa90a24d7e55a (patch) | |
tree | c8d5fae96cf6bc24271937cffd8489c298758431 /test/test-advice-of-charge | |
parent | 0c1fcd2b50908bda607fce70c796033e33832b11 (diff) | |
download | ofono-0393a41e3589380b701dc73fc15fa90a24d7e55a.tar.gz |
test: Make exceptions compatible with Python 3
Use "except Type as var" syntax to work with both Python >= 2.6
and Python 3.
Diffstat (limited to 'test/test-advice-of-charge')
-rwxr-xr-x | test/test-advice-of-charge | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test-advice-of-charge b/test/test-advice-of-charge index bb52f5b0..6fa3a7c4 100755 --- a/test/test-advice-of-charge +++ b/test/test-advice-of-charge @@ -67,7 +67,7 @@ if __name__ == "__main__": print("Resetting Accumulated Call Meter") try: cm.Reset(pin) - except dbus.DBusException, e: + except dbus.DBusException as e: print("Unable to reset ACM: %s" % e) sys.exit(1) else: @@ -77,7 +77,7 @@ if __name__ == "__main__": elif property == 'PricePerUnit': newvalue = float(newvalue) cm.SetProperty(property, newvalue, pin) - except dbus.DBusException, e: + except dbus.DBusException as e: print("Unable to set property: %s" % e) sys.exit(1) |