shell_command: propogate asyncio cancel exceptions

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2023-06-25 06:02:34 -04:00
parent 1d3e5564a2
commit 0592181f54
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 2 additions and 0 deletions

View File

@ -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")