From d427118eb3a19a002b1889b7ed634c3eb877c2b5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 27 Jul 2006 19:11:21 +0000 Subject: Fix ENOENT exception handler so that it only wraps the relevant stat call. svn path=/main/trunk/; revision=4032 --- pym/portage.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'pym/portage.py') diff --git a/pym/portage.py b/pym/portage.py index 19bd65a51..4cb3716e0 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2067,7 +2067,13 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks", if mydigests!=None and mydigests.has_key(myfile): try: - mystat=os.stat(mysettings["DISTDIR"]+"/"+myfile) + mystat = os.stat(myfile_path) + except OSError, e: + if e.errno != errno.ENOENT: + raise + del e + fetched = 0 + else: # no exception? file exists. let digestcheck() report # an appropriately for size or checksum errors if (mystat[stat.ST_SIZE]