commit: f0070ca55e61ad8cf3b259797e675c22b17f2bc6 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Sun Jan 24 10:31:50 2016 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sun Jan 24 10:32:36 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f0070ca5
binarytree: fix PORTAGE_BINHOST KeyError (bug 572746) Use the "get" method to avoid triggering a KeyError. Fixes: 39d81c514c33 ("[...]config.__getitem__(): Partially drop backward compatibility for nonexistent keys.") X-Gentoo-Bug: 572746 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=572746 pym/portage/dbapi/bintree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 9f47436..dc18d30 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -775,7 +775,7 @@ class binarytree(object): self._update_pkgindex_header(pkgindex.header) self._pkgindex_write(pkgindex) - if getbinpkgs and not self.settings["PORTAGE_BINHOST"]: + if getbinpkgs and not self.settings.get("PORTAGE_BINHOST"): writemsg(_("!!! PORTAGE_BINHOST unset, but use is requested.\n"), noiselevel=-1)