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/set-context-property | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/set-context-property') diff --git a/test/set-context-property b/test/set-context-property index c18e55a0..64a6fb87 100755 --- a/test/set-context-property +++ b/test/set-context-property @@ -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) -- cgit v1.2.3