diff options
-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: |