Merge with stable
authorChristian Ebert <blacktrash@gmx.net>
Mon, 08 Aug 2011 09:38:40 +0100
changeset 978 600f20908ede
parent 976 9c15f5c37707 (current diff)
parent 977 a50ed14997fc (diff)
child 979 6cabb1c47f21
Merge with stable
--- a/tests/run-tests.py	Thu Jul 14 08:39:48 2011 +0100
+++ b/tests/run-tests.py	Mon Aug 08 09:38:40 2011 +0100
@@ -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