.kill() a process when it times out
This commit is contained in:
parent
3016916087
commit
fa336d6023
1 changed files with 2 additions and 2 deletions
|
@ -51,8 +51,8 @@ class Module(object):
|
|||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
try:
|
||||
proc.wait(5)
|
||||
except subprocess.TimeoutExpired:
|
||||
# execution of script expired
|
||||
except subprocess.TimeoutExpired as e:
|
||||
proc.kill()
|
||||
return
|
||||
|
||||
out = proc.stdout.read().decode("utf8").strip("\n")
|
||||
|
|
Loading…
Reference in a new issue