diff options
-rw-r--r-- | pym/_emerge/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 44f7e53e0..3ba5d01fc 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1523,7 +1523,8 @@ class CompositeTask(AsynchronousTask): def cancel(self): self._task_queue.clear() self.cancelled = True - self._current_task.cancel() + if self._current_task is not None: + self._current_task.cancel() def wait(self): |