fix crash when forcing termination of subprocesses

This commit is contained in:
Fredrik Eriksson 2019-05-26 12:18:24 +02:00
parent aa3aef7be0
commit 5de7b77f04
No known key found for this signature in database
GPG Key ID: 8825C73A0FD1502A

View File

@ -17,7 +17,7 @@ def exec_cmd(cmd, timeout=900, env = None):
try: try:
out, err = proc.communicate(timeout=timeout) out, err = proc.communicate(timeout=timeout)
except subprocess.TimeoutExpired as err: except subprocess.TimeoutExpired as ex:
log.error('Command "{}" timed out, killing it.'.format(' '.join(cmd))) log.error('Command "{}" timed out, killing it.'.format(' '.join(cmd)))
proc.kill() proc.kill()
time.sleep(30) time.sleep(30)