mirror of
1
0
Fork 0

Fix version check

The version checking code fails on Python 2.6 and earlier.
`sys.version_info` only became a named tuple in Python 2.7. The
recommended way to get the check to work in earlier versions of Python
is to access it as a regular tuple.
This commit is contained in:
lbriggs 2014-12-18 22:52:02 +00:00 committed by Anish Athalye
parent 992ba4a2a9
commit 285543ac6a
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ def inject(lib_path):
sys.path.insert(0, path)
# version dependent libraries
if sys.version_info.major >= 3:
if sys.version_info[0] >= 3:
inject('pyyaml/lib3')
else:
inject('pyyaml/lib')