aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2016-06-02 08:46:41 -0700
committerZac Medico <zmedico@gentoo.org>2016-06-02 08:47:49 -0700
commit90e142b8fccba0507687b747478c5e060effcb00 (patch)
treea02bd067fd0ca39284f5a1102cd1dcb9c3e403ec
parentinstall-qa-check.d/60openrc: validate bash for openrc-run shebangs (diff)
downloadportage-90e142b8fccba0507687b747478c5e060effcb00.tar.gz
portage-90e142b8fccba0507687b747478c5e060effcb00.tar.bz2
portage-90e142b8fccba0507687b747478c5e060effcb00.zip
binarytree._populate: suppress PORTAGE_SSH_OPTS KeyError (bug 572494)
Use the "get" method to avoid triggering a KeyError message. Fixes: 39d81c514c33 ("[...]config.__getitem__(): Partially drop backward compatibility for nonexistent keys.") X-Gentoo-Bug: 572494 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=572494
-rw-r--r--pym/portage/dbapi/bintree.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index dc18d30ed..f4830597e 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -905,10 +905,9 @@ class binarytree(object):
}
for k in ("PORTAGE_SSH_OPTS",):
- try:
- fcmd_vars[k] = self.settings[k]
- except KeyError:
- pass
+ v = self.settings.get(k)
+ if v is not None:
+ fcmd_vars[k] = v
success = portage.getbinpkg.file_get(
fcmd=fcmd, fcmd_vars=fcmd_vars)