summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-05-27 21:03:22 +0000
committerZac Medico <zmedico@gentoo.org>2006-05-27 21:03:22 +0000
commit0d8d30a260167c6d46115e47bf3e95c29497eb0c (patch)
treedfe8224e03d85b4bef59ad95dd2fe7210ecc381a /pym
parentfdc974f5da4dd94dce7df1408b8cb4d62256e10f (diff)
downloadportage-0d8d30a260167c6d46115e47bf3e95c29497eb0c.tar.gz
portage-0d8d30a260167c6d46115e47bf3e95c29497eb0c.tar.bz2
portage-0d8d30a260167c6d46115e47bf3e95c29497eb0c.zip
Ignore ENOENT errors that are expected to occur in portage.fetch().
svn path=/main/trunk/; revision=3433
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py14
1 files changed, 10 insertions, 4 deletions
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: