selftest and autrobuild: convert 'except X, e' to 'except X as e'
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 13 Feb 2018 21:35:53 +0000 (10:35 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 14 Feb 2018 23:18:30 +0000 (00:18 +0100)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
script/autobuild.py
selftest/subunithelper.py

index 40bace59ccb954d7544031cb0734195594c4e198..ebe49bb75cbc357feb8a986e47c117a59fac4b8b 100755 (executable)
@@ -747,7 +747,7 @@ top_commit_msg = run_cmd("git log -1", dir=gitroot, output=True)
 
 try:
     os.makedirs(testbase)
-except Exception, reason:
+except Exception as reason:
     raise Exception("Unable to create %s : %s" % (testbase, reason))
 cleanup_list.append(testbase)
 
index fab7d6f0b41706322fbab1311cec2bcb657df6ba..028f5dff77e6d6abb2a9016f2f3a2c6d70d0f7e6 100644 (file)
@@ -64,7 +64,7 @@ def parse_results(msg_ops, statistics, fh):
             msg_ops.control_msg(l)
             try:
                 dt = iso8601.parse_date(arg.rstrip("\n"))
-            except TypeError, e:
+            except TypeError as e:
                 print "Unable to parse time line: %s" % arg.rstrip("\n")
             else:
                 msg_ops.time(dt)