Merge branch 'ak04nv-python3_fix' into development
This commit is contained in:
commit
2ee75c1d82
1 changed files with 3 additions and 15 deletions
16
secretary.py
16
secretary.py
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue