summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-12-08 12:51:27 -0500
committerSimo Sorce <simo@redhat.com>2015-03-21 14:23:12 -0400
commite7e2f0b8962b8739d5c1b3b5d16b7fcf67e62f75 (patch)
tree0bddfae560085a8720e2326a80a1882978d6752e
parent8a00b0cfd799face822366902da69e4ac383d962 (diff)
downloadgss-proxy-e7e2f0b8962b8739d5c1b3b5d16b7fcf67e62f75.tar.gz
gss-proxy-e7e2f0b8962b8739d5c1b3b5d16b7fcf67e62f75.tar.xz
gss-proxy-e7e2f0b8962b8739d5c1b3b5d16b7fcf67e62f75.zip
Prevent a backtrace when a subprocess is not found
Trap OSError is the kill does not find the subprocess. This may happen if the subprocess fails early and terminates on its own. Signed-off-by: Simo Sorce <simo@redhat.com>
-rwxr-xr-xproxy/tests/runtests.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/proxy/tests/runtests.py b/proxy/tests/runtests.py
index a941064..7cceb2f 100755
--- a/proxy/tests/runtests.py
+++ b/proxy/tests/runtests.py
@@ -355,13 +355,19 @@ def run_basic_test(testdir, logfile, env):
p1.wait()
if p1.returncode != 0:
print >> sys.stderr, "FAILED: Init test"
- os.killpg(p2.pid, signal.SIGTERM)
+ try:
+ os.killpg(p2.pid, signal.SIGTERM)
+ except OSError:
+ pass
else:
print >> sys.stderr, "SUCCESS: Init test"
p2.wait()
if p2.returncode != 0:
print >> sys.stderr, "FAILED: Accept test"
- os.killpg(p1.pid, signal.SIGTERM)
+ try:
+ os.killpg(p1.pid, signal.SIGTERM)
+ except OSError:
+ pass
else:
print >> sys.stderr, "SUCCESS: Accept test"