Simplify fetch failure logic.
authorZac Medico <zmedico@gentoo.org>
Thu, 27 Jul 2006 08:22:40 +0000 (08:22 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 27 Jul 2006 08:22:40 +0000 (08:22 -0000)
svn path=/main/trunk/; revision=4030

pym/portage.py

index ad2c72c1c99b507bfe9f516b32884f89422725bf..43110b2e806b18de9ed95f1392db98a8ceb9fde7 100644 (file)
@@ -2135,19 +2135,17 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
 
                if listonly:
                        writemsg("\n")
-               if fetched != 2 and restrict_fetch:
-                       print "\n!!!", mysettings["CATEGORY"] + "/" + \
-                               mysettings["PF"], "has fetch restriction turned on."
-                       print "!!! This probably means that this " + \
-                               "ebuild's files must be downloaded"
-                       print "!!! manually.  See the comments in" + \
-                               " the ebuild for more information.\n"
-                       spawn(EBUILD_SH_BINARY + " nofetch", mysettings)
-                       if listonly:
-                               return 0
-               if (fetched!=2) and not listonly:
+               if fetched != 2:
                        if restrict_fetch:
-                               pass
+                               print "\n!!!", mysettings["CATEGORY"] + "/" + \
+                                       mysettings["PF"], "has fetch restriction turned on."
+                               print "!!! This probably means that this " + \
+                                       "ebuild's files must be downloaded"
+                               print "!!! manually.  See the comments in" + \
+                                       " the ebuild for more information.\n"
+                               spawn(EBUILD_SH_BINARY + " nofetch", mysettings)
+                       elif listonly:
+                               continue
                        elif not filedict[myfile]:
                                writemsg("Warning: No mirrors available for file" + \
                                        " '%s'\n" % (myfile), noiselevel=-1)