Commit 341de4f5 authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

Fix runtests.py for Python 2.6.1

- This is the version of Python that comes with Snow Leopard
parent da0dd2bf
......@@ -109,9 +109,11 @@ for opt,arg in opts:
# these components (see trac #3091), but int() chokes on the
# 'c1', so we drop it.
(maj, min, pat) = platform.python_version_tuple()
maj = int(re.sub('[^0-9].*', '', maj))
min = int(re.sub('[^0-9].*', '', min))
pat = int(re.sub('[^0-9].*', '', pat))
# We wrap maj, min, and pat in str() to work around a bug in python
# 2.6.1
maj = int(re.sub('[^0-9].*', '', str(maj)))
min = int(re.sub('[^0-9].*', '', str(min)))
pat = int(re.sub('[^0-9].*', '', str(pat)))
if (maj, min, pat) >= (2, 5, 2):
config.threads = int(arg)
config.use_threads = 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment