summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/fetch2')
-rw-r--r--lib/bb/fetch2/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 8e35f5487..ee3476bcc 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/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