summaryrefslogtreecommitdiffstats
path: root/test/test-gnss
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2014-03-11 17:39:19 +0100
committerDenis Kenzior <denkenz@gmail.com>2014-03-11 19:32:46 -0500
commit0393a41e3589380b701dc73fc15fa90a24d7e55a (patch)
treec8d5fae96cf6bc24271937cffd8489c298758431 /test/test-gnss
parent0c1fcd2b50908bda607fce70c796033e33832b11 (diff)
downloadofono-0393a41e3589380b701dc73fc15fa90a24d7e55a.tar.bz2
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-gnss')
-rwxr-xr-xtest/test-gnss6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test-gnss b/test/test-gnss
index 98246274..62b56f91 100755
--- a/test/test-gnss
+++ b/test/test-gnss
@@ -44,21 +44,21 @@ def stdin_handler(fd, condition, gnss, path):
try:
gnss.SendPositioningElement(dbus.String(xml))
print("ok")
- except dbus.DBusException, e:
+ except dbus.DBusException as e:
print("Unable to send positioning element")
elif in_key == '1':
try:
gnss.RegisterPositioningRequestAgent("/test/posagent")
print("ok")
- except dbus.DBusException, e:
+ except dbus.DBusException as e:
print("Unable to register positioning agent")
elif in_key == '2':
try:
gnss.UnregisterPositioningRequestAgent(path)
print("ok")
- except dbus.DBusException, e:
+ except dbus.DBusException as e:
print("Unable to unregister positioning agent")
elif in_key == 'x':
sys.exit(1)