diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-05 12:36:40 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-05 12:36:40 +0000 |
commit | f1f8b974f0ef758a44a35045e01d7a1031efbbc1 (patch) | |
tree | 22cf91df0e5e0687109f2f6cba1bae756873423c | |
parent | d85c316ae2277076845c589b9a84656cfa967c98 (diff) | |
download | portage-f1f8b974f0ef758a44a35045e01d7a1031efbbc1.tar.gz portage-f1f8b974f0ef758a44a35045e01d7a1031efbbc1.tar.bz2 portage-f1f8b974f0ef758a44a35045e01d7a1031efbbc1.zip |
Fix CompositeTask.cancel() so that it's safe to call when there is no
running task.
svn path=/main/trunk/; revision=10941
-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): |