From 0e765d1f39a9355df4b8cdb54bfa60cb3fbe78ed Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Tue, 8 Jul 2014 14:08:28 -0400 Subject: [PATCH] Fix wrong number of parameters --- crunch_scripts/run-command | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command index 71a9f963af..7a65f53773 100755 --- a/crunch_scripts/run-command +++ b/crunch_scripts/run-command @@ -56,7 +56,7 @@ class SigHandler(object): def __init__(self): self.sig = None - def send_signal(self, sp, signum, sig): + def send_signal(self, sp, signum): sp.send_signal(signum) self.sig = signum @@ -84,10 +84,8 @@ try: # wait for process to complete. rcode = sp.wait() - print("sig is %s" % sig.sig) - - if len(sig) > 0: - print("run-command: terminating on signal %s" % sig[0]) + if sig.sig != None: + print("run-command: terminating on signal %s" % sig.sig) sys.exit(rcode) else: print("run-command: completed with exit code %i (%s)" % (rcode, "success" if rcode == 0 else "failed")) -- 2.30.2