diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-10-11 23:06:25 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-10-11 23:06:25 +0000 |
commit | d5425058de071acf1c98f2df41ee6d40bdcdbbac (patch) | |
tree | 3884f000afa8f22fc70ff59c765a0bcba3546e13 | |
parent | 9fef3b911b12a2229de08d01797eec5824857c2c (diff) | |
download | portage-d5425058de071acf1c98f2df41ee6d40bdcdbbac.tar.gz portage-d5425058de071acf1c98f2df41ee6d40bdcdbbac.tar.bz2 portage-d5425058de071acf1c98f2df41ee6d40bdcdbbac.zip |
Bug #288551 - Handle invalid cpv in portdbapi.aux_get() by raising KeyError.
svn path=/main/trunk/; revision=14579
-rw-r--r-- | pym/portage/dbapi/porttree.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index e955a6a57..a993227ca 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -609,7 +609,11 @@ class portdbapi(dbapi): return [aux_cache.get(x, "") for x in mylist] cache_me = True global auxdbkeys, auxdbkeylen - cat,pkg = mycpv.split("/", 1) + try: + cat, pkg = mycpv.split("/", 1) + except ValueError: + # Missing slash. Can't find ebuild so raise KeyError. + raise KeyError(mycpv) myebuild, mylocation = self.findname2(mycpv, mytree) |