From 2d2cb6ee98324b478a5671df2178f91104bcbd12 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 18 Oct 2012 18:27:59 -0700 Subject: [PATCH] PipeReader: unregister in _cancel --- pym/_emerge/PipeReader.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/PipeReader.py b/pym/_emerge/PipeReader.py index fcdefb482..7209e9e93 100644 --- a/pym/_emerge/PipeReader.py +++ b/pym/_emerge/PipeReader.py @@ -34,8 +34,9 @@ class PipeReader(AbstractPollTask): self._registered = True def _cancel(self): + self._unregister() if self.returncode is None: - self.returncode = 1 + self.returncode = self._cancelled_returncode def _wait(self): if self.returncode is not None: -- 2.26.2