Skip to content
Snippets Groups Projects
Commit fba40452 authored by Sybren A. Stüvel's avatar Sybren A. Stüvel
Browse files

Gracefully handle aborting a command without `self.proc` attribute

parent d2e3791c
Branches
Tags
No related merge requests found
......@@ -543,7 +543,7 @@ class AbstractSubprocessCommand(AbstractCommand, abc.ABC):
async def abort(self):
"""Aborts the command by killing the subprocess."""
if self.proc is None or self.proc == attr.NOTHING:
if getattr(self, 'proc', None) is None or self.proc == attr.NOTHING:
self._log.debug("No process to kill. That's ok.")
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment