Fix reading 'major' property on Python 2.6.
This commit is contained in:
parent
2ee75c1d82
commit
7fd4bdbc26
1 changed files with 8 additions and 3 deletions
|
|
@ -29,9 +29,14 @@ from xml.dom.minidom import parseString
|
||||||
from xml.parsers.expat import ExpatError
|
from xml.parsers.expat import ExpatError
|
||||||
from jinja2 import Environment, Undefined
|
from jinja2 import Environment, Undefined
|
||||||
|
|
||||||
|
try:
|
||||||
if sys.version_info.major == 3:
|
if sys.version_info.major == 3:
|
||||||
xrange = range
|
xrange = range
|
||||||
basestring = (str, bytes)
|
basestring = (str, bytes)
|
||||||
|
except AttributeError:
|
||||||
|
# On Python 2.6 sys.version_info is a tuple
|
||||||
|
if not isinstance(sys.version_info, tuple):
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
FLOW_REFERENCES = {
|
FLOW_REFERENCES = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue