From ff4a1a1cc0accaaf106d2ef664c92ec04cb59cad Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 28 Apr 2006 21:46:31 +0000 Subject: [PATCH] Fix spelling of "hierarchy" for bug #131582 and raise an exception for cleaner error handling. svn path=/main/trunk/; revision=3261 --- bin/emerge | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/emerge b/bin/emerge index a982c20e8..88f18d323 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1084,8 +1084,8 @@ class depgraph: print red("*** page for details.") countdown(EMERGE_WARNING_DELAY, "Continuing...") else: - print red("\n*** %s is not in a valid PORTDIR heirarchy or does not exist" % x) - sys.exit(1) + raise portage_exception.PackageNotFound( + "%s is not in a valid portage tree hierarchy or does not exist" % x) if not self.create(["ebuild",portage.root,mykey],None,"--onlydeps" not in myopts): return (0,myfavorites) elif not "--oneshot" in myopts: @@ -3309,7 +3309,11 @@ else: if not ("--quiet" in myopts): print "Calculating dependencies ", sys.stdout.flush() - retval,favorites=mydepgraph.select_files(myfiles) + try: + retval, favorites = mydepgraph.select_files(myfiles) + except portage_exception.PackageNotFound, e: + portage.writemsg("\n!!! %s\n" % str(e)) + sys.exit(1) if not retval: sys.exit(1) if not ("--quiet" in myopts): -- 2.26.2