bitbake/fetch2: Ignore UnboundLocalError in exception handler in try_mirror

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2011-02-08 17:30:45 +00:00
parent ee1a9c0476
commit aa45760702
1 changed files with 5 additions and 2 deletions

View File

@ -448,8 +448,11 @@ def try_mirrors(d, origud, mirrors, check = False):
except bb.fetch2.BBFetchException:
logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url))
if os.path.isfile(ud.localpath):
bb.utils.remove(ud.localpath)
try:
if os.path.isfile(ud.localpath):
bb.utils.remove(ud.localpath)
except UnboundLocalError:
pass
continue
return None