diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2017-06-29 20:33:23 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-07-06 14:06:08 -0700 |
commit | 52e4a477f0b3c0a0ece7adeede6e06e07814f8b9 (patch) | |
tree | 061bdcbae0cfe6252bf03e8c34c410d0b7d20ff7 /ovsdb | |
parent | d34a1cc02536f9a812517a71accec3fbd3c6c98b (diff) | |
download | openvswitch-52e4a477f0b3c0a0ece7adeede6e06e07814f8b9.tar.gz |
Python3 compatibility: exception cleanup
The exception syntax which is compatible with python2 and python3 is
to use the "as" form for "except:".
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovsdb')
-rwxr-xr-x | ovsdb/ovsdb-doc | 4 | ||||
-rwxr-xr-x | ovsdb/ovsdb-idlc.in | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc index b34fb11f3..918e88ab3 100755 --- a/ovsdb/ovsdb-doc +++ b/ovsdb/ovsdb-doc @@ -278,7 +278,7 @@ if __name__ == "__main__": options, args = getopt.gnu_getopt(sys.argv[1:], 'hV', ['er-diagram=', 'version=', 'help']) - except getopt.GetoptError, geo: + except getopt.GetoptError as geo: sys.stderr.write("%s: %s\n" % (argv0, geo.msg)) sys.exit(1) @@ -306,7 +306,7 @@ if __name__ == "__main__": if len(line): print(line) - except error.Error, e: + except error.Error as e: sys.stderr.write("%s: %s\n" % (argv0, e.msg)) sys.exit(1) diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in index 106444841..8b85f0def 100755 --- a/ovsdb/ovsdb-idlc.in +++ b/ovsdb/ovsdb-idlc.in @@ -1098,7 +1098,7 @@ if __name__ == "__main__": ['directory', 'help', 'version']) - except getopt.GetoptError, geo: + except getopt.GetoptError as geo: sys.stderr.write("%s: %s\n" % (argv0, geo.msg)) sys.exit(1) @@ -1136,7 +1136,7 @@ if __name__ == "__main__": sys.exit(1) func(*args[1:]) - except ovs.db.error.Error, e: + except ovs.db.error.Error as e: sys.stderr.write("%s: %s\n" % (argv0, e)) sys.exit(1) |