From 0393a41e3589380b701dc73fc15fa90a24d7e55a Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 11 Mar 2014 17:39:19 +0100 Subject: test: Make exceptions compatible with Python 3 Use "except Type as var" syntax to work with both Python >= 2.6 and Python 3. --- test/test-ss-control-cb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/test-ss-control-cb') diff --git a/test/test-ss-control-cb b/test/test-ss-control-cb index 505bcd74..d972097a 100755 --- a/test/test-ss-control-cb +++ b/test/test-ss-control-cb @@ -37,25 +37,25 @@ if __name__ == "__main__": print("Trying invalid SS request for CB") try: print(ss.Initiate("*33#456666")) - except dbus.DBusException, e: + except dbus.DBusException as e: print("Failed with %s - Good" % e) print("Trying invalid SS request for CB") try: print(ss.Initiate("*33*ABC#")) - except dbus.DBusException, e: + except dbus.DBusException as e: print("Failed with %s - Good" % e) print("Trying invalid SS request for CB") try: print(ss.Initiate("*33**ABC#")) - except dbus.DBusException, e: + except dbus.DBusException as e: print("Failed with %s - Good" % e) print("Trying invalid SS request for CB") try: print(ss.Initiate("*33***12#")) - except dbus.DBusException, e: + except dbus.DBusException as e: print("Failed with %s - Good" % e) print("Query Outgoing All") -- cgit v1.2.3