2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-21 14:49:41 +00:00

python: Stop using xrange().

Python 2 had range() and xrange().  xrange() is more efficient, but
behaves differently so range() was retained for compatibility.  Python 3
only has range() and it behaves like Python 2's xrange().

Remove explicit use of xrange() and use six.moves.range() to
make sure we're using xrange() from Python 2 or range() from Python 3.

Signed-off-by: Russell Bryant <russell@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Russell Bryant
2015-12-14 14:33:52 -05:00
parent 73eb682edb
commit b3ac29477d
9 changed files with 16 additions and 2 deletions

View File

@@ -15,6 +15,8 @@
import re
import uuid
from six.moves import range
from ovs.db import error
import ovs.db.parser