Instead of calling sys.exit() when aux_get() fails inside getfetchlist(), convert...
authorZac Medico <zmedico@gentoo.org>
Fri, 1 Jun 2007 15:51:36 +0000 (15:51 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 1 Jun 2007 15:51:36 +0000 (15:51 -0000)
svn path=/main/trunk/; revision=6708

pym/portage/dbapi/porttree.py

index 5488251e648907d1615023c9cd02cf6c00c3eaf8..6130dd49dfb6853b63c773534ee338a24e66c121 100644 (file)
@@ -362,8 +362,10 @@ class portdbapi(dbapi):
                try:
                        myuris = self.aux_get(mypkg, ["SRC_URI"], mytree=mytree)[0]
                except KeyError:
-                       print red("getfetchlist():")+" aux_get() error reading "+mypkg+"; aborting."
-                       sys.exit(1)
+                       # Convert this to an InvalidDependString exception since callers
+                       # already handle it.
+                       raise portage.exception.InvalidDependString(
+                               "getfetchlist(): aux_get() error reading "+mypkg+"; aborting.")
 
                if useflags is None:
                        useflags = mysettings["USE"].split()