Catch all other exceptions in subprocess run
Found a rare glitch where the subprocess pipes would not engage, causing a daemon crash. Catch these exceptions with a retcode of 255 instead of bailing out. Closes #124
This commit is contained in:
parent
5ceb57e540
commit
b851a6209c
|
@ -91,6 +91,8 @@ def run_os_command(command_string, background=False, environment=None, timeout=N
|
||||||
retcode = command_output.returncode
|
retcode = command_output.returncode
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
retcode = 128
|
retcode = 128
|
||||||
|
except Exception:
|
||||||
|
retcode = 255
|
||||||
|
|
||||||
try:
|
try:
|
||||||
stdout = command_output.stdout.decode('ascii')
|
stdout = command_output.stdout.decode('ascii')
|
||||||
|
|
Loading…
Reference in New Issue