diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-10-11 23:01:30 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-10-11 23:01:30 +0000 |
commit | 4a51226706894b78c249fd095025cdd24501d389 (patch) | |
tree | a7e73f6b1b07accb44d27f9df71105e11c5a488a | |
parent | 0f66235bce301fc21cddf080a0b436d5cb748f4a (diff) | |
download | portage-4a51226706894b78c249fd095025cdd24501d389.tar.gz portage-4a51226706894b78c249fd095025cdd24501d389.tar.bz2 portage-4a51226706894b78c249fd095025cdd24501d389.zip |
Bug #288551 - Fix portageq to handle portage.exception.AmbiguousPackageName
instead of ValueError. (trunk r14577)
svn path=/main/branches/2.1.7/; revision=14578
-rwxr-xr-x | bin/portageq | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/bin/portageq b/bin/portageq index dea77836b..972e78e2a 100755 --- a/bin/portageq +++ b/bin/portageq @@ -603,11 +603,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. |