summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 670afb1eed..5d7ef1f014 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -507,8 +507,7 @@ def try_mirrors(d, origud, mirrors, check = False):
507 logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url)) 507 logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url))
508 logger.debug(1, str(e)) 508 logger.debug(1, str(e))
509 try: 509 try:
510 if os.path.isfile(ud.localpath): 510 ud.method.clean(ud, ld)
511 bb.utils.remove(ud.localpath)
512 except UnboundLocalError: 511 except UnboundLocalError:
513 pass 512 pass
514 continue 513 continue
@@ -984,8 +983,7 @@ class Fetch(object):
984 logger.debug(1, str(e)) 983 logger.debug(1, str(e))
985 firsterr = e 984 firsterr = e
986 # Remove any incomplete fetch 985 # Remove any incomplete fetch
987 if os.path.isfile(ud.localpath): 986 m.clean(ud, self.d)
988 bb.utils.remove(ud.localpath)
989 logger.debug(1, "Trying MIRRORS") 987 logger.debug(1, "Trying MIRRORS")
990 mirrors = mirror_from_string(self.d.getVar('MIRRORS', True)) 988 mirrors = mirror_from_string(self.d.getVar('MIRRORS', True))
991 localpath = try_mirrors (self.d, ud, mirrors) 989 localpath = try_mirrors (self.d, ud, mirrors)