From: Zac Medico Date: Thu, 27 Jul 2006 19:11:21 +0000 (-0000) Subject: Fix ENOENT exception handler so that it only wraps the relevant stat call. X-Git-Tag: v2.1.1~133 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d427118eb3a19a002b1889b7ed634c3eb877c2b5;p=portage.git Fix ENOENT exception handler so that it only wraps the relevant stat call. svn path=/main/trunk/; revision=4032 --- 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]