summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-10-11 23:01:00 +0000
committerZac Medico <zmedico@gentoo.org>2009-10-11 23:01:00 +0000
commit9fef3b911b12a2229de08d01797eec5824857c2c (patch)
tree0e730f9bc374d9c441d914940df333658d51d6a9 /bin
parentd7caec93cd3622bafb1e41483cb975131758b175 (diff)
downloadportage-9fef3b911b12a2229de08d01797eec5824857c2c.tar.gz
portage-9fef3b911b12a2229de08d01797eec5824857c2c.tar.bz2
portage-9fef3b911b12a2229de08d01797eec5824857c2c.zip
Bug #288551 - Fix portageq to handle portage.exception.AmbiguousPackageName
instead of ValueError. svn path=/main/trunk/; revision=14577
Diffstat (limited to 'bin')
-rwxr-xr-xbin/portageq6
1 files changed, 1 insertions, 5 deletions
diff --git a/bin/portageq b/bin/portageq
index cea14231f..723d12046 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -626,11 +626,7 @@ def main():
except portage.exception.ParseError as e:
sys.stderr.write("%s\n" % str(e))
sys.exit(1)
- except ValueError as e:
- if not e.args or \
- not hasattr(e.args[0], "__len__") or \
- len(e.args[0]) < 2:
- raise
+ except portage.exception.AmbiguousPackageName as e:
# Multiple matches thrown from cpv_expand
pkgs = e.args[0]
# An error has occurred so we writemsg to stderr and exit nonzero.