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:
Joshua Boniface 2021-05-10 01:05:55 -04:00
parent 5ceb57e540
commit b851a6209c
1 changed files with 2 additions and 0 deletions

View File

@ -91,6 +91,8 @@ def run_os_command(command_string, background=False, environment=None, timeout=N
retcode = command_output.returncode
except subprocess.TimeoutExpired:
retcode = 128
except Exception:
retcode = 255
try:
stdout = command_output.stdout.decode('ascii')