1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 12:29:55 +00:00

bitbake: fetch2: Remove basestring test and simplify uri_replace

(From Poky rev: d5657883d34bfef6beec594ac8d799f617b6b3ad)

(Bitbake rev: 84ffc261f376429b3a6b5d7bf2f6217cd10ca12a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2012-06-20 12:54:46 +00:00
parent a7d5c57006
commit bf8501897b
+3 -2
View File
@@ -193,8 +193,9 @@ def uri_replace(ud, uri_find, uri_replace, d):
result_decoded = ['', '', '', '', '', {}] result_decoded = ['', '', '', '', '', {}]
for loc, i in enumerate(uri_find_decoded): for loc, i in enumerate(uri_find_decoded):
result_decoded[loc] = uri_decoded[loc] result_decoded[loc] = uri_decoded[loc]
if isinstance(i, basestring): if loc == 5:
if (re.match(i, uri_decoded[loc])): continue
elif (re.match(i, uri_decoded[loc])):
if not uri_replace_decoded[loc]: if not uri_replace_decoded[loc]:
result_decoded[loc] = "" result_decoded[loc] = ""
else: else: