summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-10-11 23:06:34 +0000
committerZac Medico <zmedico@gentoo.org>2009-10-11 23:06:34 +0000
commite8ed714c652d46ea62cdca4088cf3522615f6af4 (patch)
treebc8fbf8998e14ba7eda9655c7cb183d12d2aa873
parentBug #288551 - Fix portageq to handle portage.exception.AmbiguousPackageName (diff)
downloadportage-e8ed714c652d46ea62cdca4088cf3522615f6af4.tar.gz
portage-e8ed714c652d46ea62cdca4088cf3522615f6af4.tar.bz2
portage-e8ed714c652d46ea62cdca4088cf3522615f6af4.zip
Bug #288551 - Handle invalid cpv in portdbapi.aux_get() by raising KeyError.
(trunk r14579) svn path=/main/branches/2.1.7/; revision=14580
-rw-r--r--pym/portage/dbapi/porttree.py6
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)