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
11
secretary.py
11
secretary.py
|
|
@ -29,9 +29,14 @@ from xml.dom.minidom import parseString
|
|||
from xml.parsers.expat import ExpatError
|
||||
from jinja2 import Environment, Undefined
|
||||
|
||||
if sys.version_info.major == 3:
|
||||
xrange = range
|
||||
basestring = (str, bytes)
|
||||
try:
|
||||
if sys.version_info.major == 3:
|
||||
xrange = range
|
||||
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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue