From: Zac Medico Date: Sun, 27 Jul 2008 01:31:33 +0000 (-0000) Subject: Fix AsynchronousTask.removeStartListener() and removeExitListener() to return X-Git-Tag: v2.2_rc4~26 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c62c3473391f30855f608e478229bddfe7de161d;p=portage.git Fix AsynchronousTask.removeStartListener() and removeExitListener() to return early if there are no listeners. svn path=/main/trunk/; revision=11202 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index cc7191ba4..fb3bd1e35 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1642,6 +1642,8 @@ class AsynchronousTask(SlotObject): self._start_listeners.append(f) def removeStartListener(self, f): + if self._start_listeners is None: + return self._start_listeners.remove(f) def _start_hook(self): @@ -1661,6 +1663,8 @@ class AsynchronousTask(SlotObject): self._exit_listeners.append(f) def removeExitListener(self, f): + if self._exit_listeners is None: + return self._exit_listeners.remove(f) def _wait_hook(self):