From: Douglas Bagnall Date: Tue, 13 Feb 2018 21:36:22 +0000 (+1300) Subject: scripts/ python: convert 'except X, e' to 'except X as e' X-Git-Tag: tevent-0.9.36~81 X-Git-Url: http://git.samba.org/samba.git/?p=garming%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=5fbb47144328b6bd4e52369c904d81633e5fdb02 scripts/ python: convert 'except X, e' to 'except X as e' Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/script/bisect-test.py b/script/bisect-test.py index e4daa8c2c12..a80baff936f 100755 --- a/script/bisect-test.py +++ b/script/bisect-test.py @@ -86,7 +86,7 @@ try: except KeyboardInterrupt: print("Cleaning up") cleanup() -except Exception, reason: +except Exception as reason: print("Failed bisect: %s" % reason) cleanup() diff --git a/script/generate_param.py b/script/generate_param.py index 611bafa9c5e..d31507c9cfc 100644 --- a/script/generate_param.py +++ b/script/generate_param.py @@ -55,7 +55,7 @@ def iterate_all(path): try: p = open(path, 'r') - except IOError, e: + except IOError as e: raise Exception("Error opening parameters file") out = p.read()