Instead of calling sys.exit() when aux_get() fails inside getfetchlist(), convert...
authorZac Medico <zmedico@gentoo.org>
Mon, 30 Jul 2007 02:55:06 +0000 (02:55 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 30 Jul 2007 02:55:06 +0000 (02:55 -0000)
svn path=/main/branches/2.1.2.9/; revision=7440

pym/portage.py

index 2f409ee751315782d666f6fb5a8ae33ef9f3378d..db74bc8ea4318622ba23c563cb36934b8fa1e450 100644 (file)
@@ -5971,8 +5971,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()