1
0
Fork 0
mirror of synced 2024-12-22 06:01:07 -05:00

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

View file

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