From: Zac Medico Date: Fri, 12 Oct 2007 07:01:59 +0000 (-0000) Subject: Raise a PackageNotFound exception instead of a ValueError X-Git-Tag: v2.1.3.16~43 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a7c1a3e94298b5bdad93a0307d32ca9e3895aba9;p=portage.git Raise a PackageNotFound exception instead of a ValueError in order to avoid ambiguity if an unexpected ValueError occurs. (trunk r8043) svn path=/main/branches/2.1.2/; revision=8072 --- diff --git a/bin/emerge b/bin/emerge index e93872291..274f2ffbd 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1947,7 +1947,7 @@ class depgraph: if not matched_packages: if raise_on_missing: - raise ValueError + raise portage_exception.PackageNotFound(x) if not arg: xinfo='"'+x+'"' else: @@ -2673,7 +2673,7 @@ class depgraph: self.target_root, mydep, raise_on_missing=True, arg=mydep): print >> sys.stderr, "\n\n!!! Problem resolving dependencies for", mydep return 0 - except ValueError: + except portage_exception.PackageNotFound: missing_atoms.append(mydep) if not self.validate_blockers():