From 76c386bea08a5d75cfc431fffe64e842aeff5fa9 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 2 Feb 2011 23:12:24 -0800 Subject: bintree: clean up dict use in old binhost code --- pym/portage/dbapi/bintree.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pym') diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 4857e7fbf..6e58608a3 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: -- cgit v1.2.3-1-g7c22