PipeReader: unregister in _cancel
authorZac Medico <zmedico@gentoo.org>
Fri, 19 Oct 2012 01:27:59 +0000 (18:27 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 19 Oct 2012 01:27:59 +0000 (18:27 -0700)
pym/_emerge/PipeReader.py

index fcdefb4825747b7b25c4bd7a184b397fb07ae1c1..7209e9e9358a47efd0faaa6eca268aae0292ce6f 100644 (file)
@@ -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: