From 0592181f54912cbb1b54864cdb997c6d6c31d6a5 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Sun, 25 Jun 2023 06:02:34 -0400 Subject: [PATCH] shell_command: propogate asyncio cancel exceptions Signed-off-by: Eric Callahan --- moonraker/components/shell_command.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/moonraker/components/shell_command.py b/moonraker/components/shell_command.py index ef29960..26b9315 100644 --- a/moonraker/components/shell_command.py +++ b/moonraker/components/shell_command.py @@ -311,6 +311,8 @@ class ShellCommand: *self.command, stdin=stdpipe, stdout=asyncio.subprocess.PIPE, stderr=errpipe, env=self.env, cwd=self.cwd) + except asyncio.CancelledError: + raise except Exception: logging.exception( f"shell_command: Command ({self.name}) failed")