run_tests.py --python3 fails if python < 2.7 is the default python version
desoxy@localhost:~/git/stem$ python --version
Python 2.6.6
desoxy@localhost:~/git/stem$ python run_tests.py --python3
Traceback (most recent call last):
File "run_tests.py", line 428, in <module>
if CONFIG["argument.python3"] and sys.version_info.major != 3:
AttributeError: 'tuple' object has no attribute 'major'
The reason is simple: sys.version_info only became a named tuple in Python v2.7 and later.[1]
Assuming you want to keep compability with older Python versions, the attached one-line patch fixes this problem.
1: http://docs.python.org/2/library/sys.html?highlight=sys#sys.version_info))
Trac:
Username: Desoxy