From fba404521c710263562123082fd1befca5c8dabc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= <sybren@stuvel.eu>
Date: Wed, 21 Nov 2018 15:32:59 +0100
Subject: [PATCH] Gracefully handle aborting a command without `self.proc`
 attribute

---
 flamenco_worker/commands.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flamenco_worker/commands.py b/flamenco_worker/commands.py
index 7bf3beff..4baf11ae 100644
--- a/flamenco_worker/commands.py
+++ b/flamenco_worker/commands.py
@@ -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
 
-- 
GitLab