From: Zac Medico Date: Tue, 25 Apr 2006 01:44:10 +0000 (-0000) Subject: Catch ValueError from cpv_expand for bug #131160. X-Git-Tag: v2.1_pre10~55 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=77a56dad7680eba09b813c7d7c1f9ea81458b970;p=portage.git Catch ValueError from cpv_expand for bug #131160. svn path=/main/trunk/; revision=3219 --- diff --git a/bin/emerge b/bin/emerge index 3c1f0b156..5f7e047bb 100755 --- a/bin/emerge +++ b/bin/emerge @@ -2983,7 +2983,11 @@ elif "config"==myaction: portage.writemsg("!!! (Did you specify a version but forget to prefix with '='?)\n") sys.exit(1) print - pkgs = portage.db[portage.root]["vartree"].dbapi.match(myfiles[0]) + try: + pkgs = portage.db[portage.root]["vartree"].dbapi.match(myfiles[0]) + except ValueError, e: + # Multiple matches thrown from cpv_expand + pkgs = e.args[0] if len(pkgs) == 0: print "No packages found.\n" sys.exit(0)