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 | fa145f1a53943243f94a32ce98525db8494b0052 (patch) | |
tree | 2754ac863344a5fc5cd763af3d6c0f8dab7e3034 /python | |
parent | 4ab665623cbb4c6506e48b82e0c9fe8585f42e13 (diff) | |
download | openvswitch-fa145f1a53943243f94a32ce98525db8494b0052.tar.gz |
Python3 compatibility: fix integer problems
In python3 maxint is not defined, but maxsize is defined in both
python2 and python3.
The put_text() will not automatically use a value which came in as
float due to a pior math function and python3 will throw an exception.
The simple answer is to convert it with int() and move on.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/build/nroff.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/build/nroff.py b/python/build/nroff.py index c23837f43..401f6992a 100644 --- a/python/build/nroff.py +++ b/python/build/nroff.py @@ -148,6 +148,8 @@ def fatal(msg): def put_text(text, x, y, s): + x = int(x) + y = int(y) extend = x + len(s) - len(text[y]) if extend > 0: text[y] += ' ' * extend |