]> git.proxmox.com Git - ovs.git/commitdiff
ovsdb: ovsdb-dot.in: Replace sys.maxint with sys.maxsize for Python3
authorMarkos Chandras <mchandras@suse.de>
Wed, 27 Dec 2017 18:27:13 +0000 (18:27 +0000)
committerBen Pfaff <blp@ovn.org>
Tue, 9 Jan 2018 19:34:45 +0000 (11:34 -0800)
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 <mchandras@suse.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
ovsdb/ovsdb-dot.in

index 43c50dabd01362066635a97f5f2fbaf85fc7037e..8eea6172455dda9e5e86a0084c99adc89837b878 100755 (executable)
@@ -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