# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 2013-11-25 21:00:46
# Node ID f694cd81b600b65d23dcdc7a02cfd6a57dd1d018
# Parent  0c22257388d6fc0f326236e09956da16931834c0

run-tests: better check for python version

Compare version by using pythons tuple comparison. So we do not match on python
3.0 or newer.

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -63,7 +63,7 @@ processlock = threading.Lock()
 # subprocess._cleanup can race with any Popen.wait or Popen.poll on py24
 # http://bugs.python.org/issue1731717 for details. We shouldn't be producing
 # zombies but it's pretty harmless even if we do.
-if sys.version_info[1] < 5:
+if sys.version_info < (2, 5):
     subprocess._cleanup = lambda: None
 
 closefds = os.name == 'posix'