changeset 32303:dc131b9772f2

run-tests: drop fallback for proc.terminate() for pre-py2.6
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 16 May 2017 14:42:13 -0700
parents 8627cf4de929
children 37bcb4665529
files tests/run-tests.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Tue May 16 14:40:22 2017 -0700
+++ b/tests/run-tests.py	Tue May 16 14:42:13 2017 -0700
@@ -523,10 +523,10 @@
         sys.stdout.flush()
 
 def terminate(proc):
-    """Terminate subprocess (with fallback for Python versions < 2.6)"""
+    """Terminate subprocess"""
     vlog('# Terminating process %d' % proc.pid)
     try:
-        getattr(proc, 'terminate', lambda : os.kill(proc.pid, signal.SIGTERM))()
+        proc.terminate()
     except OSError:
         pass