fixed xrange issue in py3

This commit is contained in:
Anton Kochnev 2015-05-07 16:02:37 +08:00
parent 81f6b9af7e
commit 1825995c4d

View file

@ -29,21 +29,9 @@ from xml.dom.minidom import parseString
from xml.parsers.expat import ExpatError
from jinja2 import Environment, Undefined
# Test python versions and normalize calls to basestring, unicode, etc.
try:
unicode = unicode
except NameError:
# 'unicode' is undefined, must be Python 3
str = str
unicode = str
bytes = bytes
if sys.version_info.major == 3:
xrange = range
basestring = (str, bytes)
else:
# 'unicode' exists, must be Python 2
str = str
unicode = unicode
bytes = str
basestring = basestring
FLOW_REFERENCES = {