summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-05-17 21:00:39 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-17 21:00:39 -0700
commitae4bdcee45f060b28707fca15ad72e896708740a (patch)
tree011ac3cd12a8828052e134c719865c0a11dbe892
parent5cfba96ca932266c7b50c9e432f13dd858e031db (diff)
downloadportage-ae4bdcee45f060b28707fca15ad72e896708740a.tar.gz
portage-ae4bdcee45f060b28707fca15ad72e896708740a.tar.bz2
portage-ae4bdcee45f060b28707fca15ad72e896708740a.zip
_LockProcess.unlock: assert successful returncode
-rw-r--r--pym/_emerge/AsynchronousLock.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLock.py
index 3e7600f17..d11797993 100644
--- a/pym/_emerge/AsynchronousLock.py
+++ b/pym/_emerge/AsynchronousLock.py
@@ -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()