aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2016-01-22 08:03:38 -0800
committerZac Medico <zmedico@gentoo.org>2016-01-22 08:03:47 -0800
commit1cf4d1e8381a44d9628feb7e3892b4ef70390ce8 (patch)
treed190aca761474f142646bbaf47100f96bb53ed25
parentrepoman: fix _here_doc_re to handle file redirection (diff)
downloadportage-1cf4d1e8381a44d9628feb7e3892b4ef70390ce8.tar.gz
portage-1cf4d1e8381a44d9628feb7e3892b4ef70390ce8.tar.bz2
portage-1cf4d1e8381a44d9628feb7e3892b4ef70390ce8.zip
BinpkgFetcher: suppress PORTAGE_SSH_OPTS KeyError message (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/_emerge/BinpkgFetcher.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/pym/_emerge/BinpkgFetcher.py b/pym/_emerge/BinpkgFetcher.py
index 91d24e08a..c8fd64487 100644
--- a/pym/_emerge/BinpkgFetcher.py
+++ b/pym/_emerge/BinpkgFetcher.py
@@ -84,10 +84,9 @@ class BinpkgFetcher(SpawnProcess):
}
for k in ("PORTAGE_SSH_OPTS",):
- try:
- fcmd_vars[k] = settings[k]
- except KeyError:
- pass
+ v = settings.get(k)
+ if v is not None:
+ fcmd_vars[k] = v
fetch_env = dict(settings.items())
fetch_args = [portage.util.varexpand(x, mydict=fcmd_vars) \