Gentoo Archives: gentoo-commits

From: Thomas Sachau <tommy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:multilib commit in: pym/portage/dbapi/
Date: Sun, 06 Feb 2011 13:14:53
Message-Id: 76c386bea08a5d75cfc431fffe64e842aeff5fa9.tommy@gentoo
1 commit: 76c386bea08a5d75cfc431fffe64e842aeff5fa9
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 3 07:12:24 2011 +0000
4 Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 3 07:12:24 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=76c386be
7
8 bintree: clean up dict use in old binhost code
9
10 ---
11 pym/portage/dbapi/bintree.py | 5 +++--
12 1 files changed, 3 insertions(+), 2 deletions(-)
13
14 diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
15 index 4857e7f..6e58608 100644
16 --- a/pym/portage/dbapi/bintree.py
17 +++ b/pym/portage/dbapi/bintree.py
18 @@ -912,13 +912,14 @@ class binarytree(object):
19 base_url, chunk_size=chunk_size)
20
21 for mypkg, remote_metadata in list(remotepkgs.items()):
22 - if "CATEGORY" not in remote_metadata:
23 + mycat = remote_metadata.get("CATEGORY")
24 + if mycat is None:
25 #old-style or corrupt package
26 writemsg(_("!!! Invalid remote binary package: %s\n") % mypkg,
27 noiselevel=-1)
28 del remotepkgs[mypkg]
29 continue
30 - mycat = remotepkgs[mypkg]["CATEGORY"].strip()
31 + mycat = mycat.strip()
32 fullpkg = mycat+"/"+mypkg[:-5]
33
34 if fullpkg in metadata: