Fix the python version comparison.

The comparison to (2, 6) doesn't seem to be correct.

For example:

>>> import sys
>>> sys.version_info <= (2, 6)
False
>>> sys.version_info[0:2] <= (2, 6)
True
>>> sys.version_info
(2, 6, 6, 'final', 0)

Change-Id: I2076d23e58a8777fe4bab81665b9b570656561e9
This commit is contained in:
Joshua Harlow 2013-04-01 15:44:13 -07:00
parent 7bf541cc90
commit 9ae5313bea

View File

@ -321,7 +321,7 @@ class NovaTestResult(testtools.TestResult):
test = subunit.ProtocolTestCase(sys.stdin, passthrough=None)
if sys.version_info <= (2, 6):
if sys.version_info[0:2] <= (2, 6):
runner = unittest.TextTestRunner(verbosity=2)
else:
runner = unittest.TextTestRunner(verbosity=2, resultclass=NovaTestResult)