From: Zac Medico Date: Sun, 11 Oct 2009 23:01:00 +0000 (-0000) Subject: Bug #288551 - Fix portageq to handle portage.exception.AmbiguousPackageName X-Git-Tag: v2.2_rc46~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9fef3b911b12a2229de08d01797eec5824857c2c;p=portage.git Bug #288551 - Fix portageq to handle portage.exception.AmbiguousPackageName instead of ValueError. svn path=/main/trunk/; revision=14577 --- 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.