From b851a6209c4018d5b58f3f482967f1b14b30f910 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 10 May 2021 01:05:55 -0400 Subject: [PATCH] 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 --- node-daemon/pvcnoded/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node-daemon/pvcnoded/common.py b/node-daemon/pvcnoded/common.py index dd8dd3ce..51fd2e6f 100644 --- a/node-daemon/pvcnoded/common.py +++ b/node-daemon/pvcnoded/common.py @@ -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')