aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-03-02 21:39:44 -0800
committerZac Medico <zmedico@gentoo.org>2020-03-02 21:46:36 -0800
commit0b78b4a90657ef582a68258f27eaf521dfb42038 (patch)
tree200633e77ac8325f4843d1c5690111a8f65ed6b0
parentdoebuild: avoid emerge --pretend --fetchonly event loop recursion (diff)
downloadportage-0b78b4a90657ef582a68258f27eaf521dfb42038.tar.gz
portage-0b78b4a90657ef582a68258f27eaf521dfb42038.tar.bz2
portage-0b78b4a90657ef582a68258f27eaf521dfb42038.zip
EbuildMetadataPhase: make _unregister idempotent (bug 711362)
Make the _unregister method check if self._files is None, as necessary for idempotency. This will prevent the AttributeError reported in bug 711362, which was triggered by recent changes in callback scheduling order. Closes: https://bugs.gentoo.org/711362 Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--lib/_emerge/EbuildMetadataPhase.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/_emerge/EbuildMetadataPhase.py b/lib/_emerge/EbuildMetadataPhase.py
index 4940d40b6..efe71892c 100644
--- a/lib/_emerge/EbuildMetadataPhase.py
+++ b/lib/_emerge/EbuildMetadataPhase.py
@@ -144,7 +144,8 @@ class EbuildMetadataPhase(SubProcess):
break
def _unregister(self):
- self.scheduler.remove_reader(self._files.ebuild)
+ if self._files is not None:
+ self.scheduler.remove_reader(self._files.ebuild)
SubProcess._unregister(self)
def _async_waitpid_cb(self, *args, **kwargs):