tests/run-tests.py
branchstable
changeset 977 a50ed14997fc
parent 975 98fa0fa48b7d
child 987 5fc540826f9f
--- a/tests/run-tests.py	Wed Jul 13 19:23:08 2011 +0200
+++ b/tests/run-tests.py	Mon Jul 25 16:37:18 2011 -0500
@@ -340,10 +340,7 @@
     """Terminate subprocess (with fallback for Python versions < 2.6)"""
     vlog('# Terminating process %d' % proc.pid)
     try:
-        if hasattr(proc, 'terminate'):
-            proc.terminate()
-        else:
-            os.kill(proc.pid, signal.SIGTERM)
+        getattr(proc, 'terminate', lambda : os.kill(proc.pid, signal.SIGTERM))()
     except OSError:
         pass