File 0004-ovsdb-ovsdb-dot.in-Replace-sys.maxint-with-sys.maxsi.patch of Package openvswitch

From 6508a559e156a8044355aa2821d2e8b25e9fb497 Mon Sep 17 00:00:00 2001
From: Markos Chandras <mchandras@suse.de>
Date: Wed, 27 Dec 2017 18:27:13 +0000
Subject: [PATCH branch-2.8 4/4] ovsdb: ovsdb-dot.in: Replace sys.maxint with
 sys.maxsize for Python3

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>
---
 ovsdb/ovsdb-dot.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in
index 43c50dabd..8eea61724 100755
--- a/ovsdb/ovsdb-dot.in
+++ b/ovsdb/ovsdb-dot.in
@@ -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
-- 
2.16.2

openSUSE Build Service is sponsored by