diff options
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 78adce2f29..ce2fb23b48 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -191,8 +191,7 @@ def uri_replace(ud, uri_find, uri_replace, d): | |||
191 | uri_replace_decoded = list(decodeurl(uri_replace)) | 191 | uri_replace_decoded = list(decodeurl(uri_replace)) |
192 | logger.debug(2, "For url %s comparing %s to %s" % (uri_decoded, uri_find_decoded, uri_replace_decoded)) | 192 | logger.debug(2, "For url %s comparing %s to %s" % (uri_decoded, uri_find_decoded, uri_replace_decoded)) |
193 | result_decoded = ['', '', '', '', '', {}] | 193 | result_decoded = ['', '', '', '', '', {}] |
194 | for i in uri_find_decoded: | 194 | for loc, i in enumerate(uri_find_decoded): |
195 | loc = uri_find_decoded.index(i) | ||
196 | result_decoded[loc] = uri_decoded[loc] | 195 | result_decoded[loc] = uri_decoded[loc] |
197 | if isinstance(i, basestring): | 196 | if isinstance(i, basestring): |
198 | if (re.match(i, uri_decoded[loc])): | 197 | if (re.match(i, uri_decoded[loc])): |
@@ -200,7 +199,7 @@ def uri_replace(ud, uri_find, uri_replace, d): | |||
200 | result_decoded[loc] = "" | 199 | result_decoded[loc] = "" |
201 | else: | 200 | else: |
202 | result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc]) | 201 | result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc]) |
203 | if uri_find_decoded.index(i) == 2: | 202 | if loc == 2: |
204 | basename = None | 203 | basename = None |
205 | if ud.mirrortarball: | 204 | if ud.mirrortarball: |
206 | basename = os.path.basename(ud.mirrortarball) | 205 | basename = os.path.basename(ud.mirrortarball) |