summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 414cc2b6b1..6789f3f9a5 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -200,8 +200,10 @@ def uri_replace(ud, uri_find, uri_replace, d):
200 if basename and not result_decoded[loc].endswith(basename): 200 if basename and not result_decoded[loc].endswith(basename):
201 result_decoded[loc] = os.path.join(result_decoded[loc], basename) 201 result_decoded[loc] = os.path.join(result_decoded[loc], basename)
202 else: 202 else:
203 return ud.url 203 return None
204 result = encodeurl(result_decoded) 204 result = encodeurl(result_decoded)
205 if result == ud.url:
206 return None
205 logger.debug(2, "For url %s returning %s" % (ud.url, result)) 207 logger.debug(2, "For url %s returning %s" % (ud.url, result))
206 return result 208 return result
207 209
@@ -462,7 +464,7 @@ def try_mirrors(d, origud, mirrors, check = False):
462 except ValueError: 464 except ValueError:
463 continue 465 continue
464 newuri = uri_replace(origud, find, replace, ld) 466 newuri = uri_replace(origud, find, replace, ld)
465 if newuri == origud.url: 467 if not newuri:
466 continue 468 continue
467 try: 469 try:
468 ud = FetchData(newuri, ld) 470 ud = FetchData(newuri, ld)