diff options
| author | 2018-10-08 23:35:37 +0100 | |
|---|---|---|
| committer | 2018-10-08 23:35:37 +0100 | |
| commit | fa336d6023c9b7d275032258e2fec33a82c133a6 (patch) | |
| tree | c34f0b65d27b388d0cc3917dc493f8c6e870a567 | |
| parent | Typo on modules/google.py, 'html' -> 'http' (diff) | |
| signature | ||
.kill() a process when it times out
| -rw-r--r-- | modules/scripts.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/scripts.py b/modules/scripts.py index d0d63efb..0c4ccb25 100644 --- a/modules/scripts.py +++ b/modules/scripts.py @@ -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") |
