From: Richard Purdie Date: Tue, 8 Feb 2011 17:30:45 +0000 (+0000) Subject: bitbake/fetch2: Ignore UnboundLocalError in exception handler in try_mirror X-Git-Tag: 2011-1~2447 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=aa45760702e874977454778659c205b29d1ff049;p=openembedded-core.git bitbake/fetch2: Ignore UnboundLocalError in exception handler in try_mirror Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 8e35f5487e..ee3476bcc8 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -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