quickpkg: use AmbiguousPackageName
authorZac Medico <zmedico@gentoo.org>
Thu, 13 Oct 2011 21:58:17 +0000 (14:58 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 13 Oct 2011 21:58:17 +0000 (14:58 -0700)
bin/quickpkg

index a326bd44ad1b9dca41f40cfee2213ddb7ef300a4..69472248fcef0abc44488872afe696ac3b4a7331 100755 (executable)
@@ -22,8 +22,8 @@ from portage import os
 from portage import xpak
 from portage.dbapi.dep_expand import dep_expand
 from portage.dep import Atom, extended_cp_match, use_reduce
-from portage.exception import InvalidAtom, InvalidData, InvalidDependString, \
-       PackageSetNotFound, PermissionDenied
+from portage.exception import (AmbiguousPackageName, InvalidAtom, InvalidData,
+       InvalidDependString, PackageSetNotFound, PermissionDenied)
 from portage.util import ConfigProtect, ensure_dirs, shlex_split
 from portage.dbapi.vartree import dblink, tar_contents
 from portage.checksum import perform_md5
@@ -43,7 +43,7 @@ def quickpkg_atom(options, infos, arg, eout):
 
        try:
                atom = dep_expand(arg, mydb=vardb, settings=vartree.settings)
-       except ValueError as e:
+       except AmbiguousPackageName as e:
                # Multiple matches thrown from cpv_expand
                eout.eerror("Please use a more specific atom: %s" % \
                        " ".join(e.args[0]))