summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-02-02 23:12:24 -0800
committerZac Medico <zmedico@gentoo.org>2011-02-02 23:16:39 -0800
commit2dd4432228b679e166ed7edaad91f938acba29e4 (patch)
tree00b8552785b3866a6077c5c1706dcf7ed5b507a1 /pym
parentae838cff74dde5e4db7fb948b739d54dbf38317f (diff)
downloadportage-2dd4432228b679e166ed7edaad91f938acba29e4.tar.gz
portage-2dd4432228b679e166ed7edaad91f938acba29e4.tar.bz2
portage-2dd4432228b679e166ed7edaad91f938acba29e4.zip
bintree: clean up dict use in old binhost code
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/bintree.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 522967a72..33482a1d3 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -912,13 +912,14 @@ class binarytree(object):
base_url, chunk_size=chunk_size)
for mypkg, remote_metadata in list(remotepkgs.items()):
- if "CATEGORY" not in remote_metadata:
+ mycat = remote_metadata.get("CATEGORY")
+ if mycat is None:
#old-style or corrupt package
writemsg(_("!!! Invalid remote binary package: %s\n") % mypkg,
noiselevel=-1)
del remotepkgs[mypkg]
continue
- mycat = remotepkgs[mypkg]["CATEGORY"].strip()
+ mycat = mycat.strip()
fullpkg = mycat+"/"+mypkg[:-5]
if fullpkg in metadata: