From: Zac Medico Date: Sat, 27 May 2006 21:03:22 +0000 (-0000) Subject: Ignore ENOENT errors that are expected to occur in portage.fetch(). X-Git-Tag: v2.1~42 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0d8d30a260167c6d46115e47bf3e95c29497eb0c;p=portage.git Ignore ENOENT errors that are expected to occur in portage.fetch(). svn path=/main/trunk/; revision=3433 --- diff --git a/pym/portage.py b/pym/portage.py index c930816d9..6eca7d59f 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2148,8 +2148,11 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", #we don't have the digest file, but the file exists. Assume it is fully downloaded. fetched=2 except (OSError,IOError),e: - writemsg("An exception was caught(1)...\nFailing the download: %s.\n" % (str(e)), - noiselevel=-1) + # ENOENT is expected from the stat call at the beginning of + # this try block. + if e.errno != errno.ENOENT: + writemsg("An exception was caught(1)...\nFailing the download: %s.\n" % (str(e)), + noiselevel=-1) fetched=0 if not can_fetch: @@ -2272,8 +2275,11 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", fetched=2 break except (OSError,IOError),e: - writemsg("An exception was caught(2)...\nFailing the download: %s.\n" % (str(e)), - noiselevel=-1) + # ENOENT is expected from the stat call at the + # beginning of this try block. + if e.errno != errno.ENOENT: + writemsg("An exception was caught(2)...\nFailing the download: %s.\n" % (str(e)), + noiselevel=-1) fetched=0 else: if not myret: