diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-04-25 01:44:10 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-04-25 01:44:10 +0000 |
commit | 77a56dad7680eba09b813c7d7c1f9ea81458b970 (patch) | |
tree | 3eb0d6bdd3297f8a0a4bd5d776b0ead31c92ec5b | |
parent | 91686dda250ffa32a088ece64f9c8b640f683fa3 (diff) | |
download | portage-77a56dad7680eba09b813c7d7c1f9ea81458b970.tar.gz portage-77a56dad7680eba09b813c7d7c1f9ea81458b970.tar.bz2 portage-77a56dad7680eba09b813c7d7c1f9ea81458b970.zip |
Catch ValueError from cpv_expand for bug #131160.
svn path=/main/trunk/; revision=3219
-rwxr-xr-x | bin/emerge | 6 |
1 files changed, 5 insertions, 1 deletions
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) |