From 0d8d30a260167c6d46115e47bf3e95c29497eb0c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 27 May 2006 21:03:22 +0000 Subject: Ignore ENOENT errors that are expected to occur in portage.fetch(). svn path=/main/trunk/; revision=3433 --- pym/portage.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'pym') 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: -- cgit v1.2.3-1-g7c22