_LockProcess.unlock: assert successful returncode
authorZac Medico <zmedico@gentoo.org>
Wed, 18 May 2011 04:00:39 +0000 (21:00 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 18 May 2011 04:00:39 +0000 (21:00 -0700)
pym/_emerge/AsynchronousLock.py

index 3e7600f1751a834b5f23fb6e64fd3138b3bed62d..d11797993233b1f6eafe609ab407a0b703e69fe7 100644 (file)
@@ -277,6 +277,9 @@ class _LockProcess(AbstractPollTask):
                        raise AssertionError('not locked')
                if self.returncode is None:
                        raise AssertionError('lock not acquired yet')
+               if self.returncode != os.EX_OK:
+                       raise AssertionError("lock process failed with returncode %s" \
+                               % (self.returncode,))
                self._unlocked = True
                self._files['pipe_out'].write(b'\0')
                self._files['pipe_out'].close()