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-24 11:46:34 -0400
commitabfa63e92a870bd35fd7c2ac362f509d2d432f2f (patch)
tree0bddfae560085a8720e2326a80a1882978d6752e
parent2a5bc7196b88e3b66d18f20aedb50568315f1374 (diff)
downloadgss-proxy-abfa63e92a870bd35fd7c2ac362f509d2d432f2f.tar.gz
gss-proxy-abfa63e92a870bd35fd7c2ac362f509d2d432f2f.tar.xz
gss-proxy-abfa63e92a870bd35fd7c2ac362f509d2d432f2f.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"