Skip to content

Commit

Permalink
ovsdb: ovsdb-dot.in: Replace sys.maxint with sys.maxsize for Python3
Browse files Browse the repository at this point in the history
There is no sys.maxint anymore on python3. However, sys.maxsize can be
used as an integer larger than any practical list or string index.

Link: https://docs.python.org/3.1/whatsnew/3.0.html#integers
Signed-off-by: Markos Chandras <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
Markos Chandras authored and blp committed Jan 9, 2018
1 parent 9a0dbc7 commit bff7da4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ovsdb/ovsdb-dot.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ def printEdge(tableName, type, baseType, label):
if type.n_min == 0:
if type.n_max == 1:
arity = "?"
elif type.n_max == sys.maxint:
elif type.n_max == sys.maxsize:
arity = "*"
else:
arity = "{,%d}" % type.n_max
elif type.n_min == 1:
if type.n_max == 1:
arity = ""
elif type.n_max == sys.maxint:
elif type.n_max == sys.maxsize:
arity = "+"
else:
arity = "{1,%d}" % type.n_max
Expand Down

0 comments on commit bff7da4

Please sign in to comment.