diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-02-02 23:12:24 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-02-02 23:12:24 -0800 |
commit | 76c386bea08a5d75cfc431fffe64e842aeff5fa9 (patch) | |
tree | b62c02ab2474c0d7af94a5a610c3aba241667717 | |
parent | 6e00e9338d22df9308e13b51956001b34341cd1e (diff) | |
download | portage-76c386bea08a5d75cfc431fffe64e842aeff5fa9.tar.gz portage-76c386bea08a5d75cfc431fffe64e842aeff5fa9.tar.bz2 portage-76c386bea08a5d75cfc431fffe64e842aeff5fa9.zip |
bintree: clean up dict use in old binhost code
-rw-r--r-- | pym/portage/dbapi/bintree.py | 5 |
1 files changed, 3 insertions, 2 deletions
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: |