summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-01-21 10:50:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-23 17:09:26 +0000
commit5d81a9186185fdac6af98f088b8be39c42aeeac9 (patch)
tree1f9db3a2b8efc8dcb49d1b8292536da44e49b489 /bitbake
parent5920b3f129f5fb4bc8e98f98999f1d1247c00ce9 (diff)
downloadpoky-5d81a9186185fdac6af98f088b8be39c42aeeac9.tar.gz
bitbake: fetch2: handle empty elements in _param_str_split
_param_str_split is used to split ?foo=1;bar=2 into a dictionary, but throws an exception if a lone semicolon is used as the value doesn't split into two items. Fix by checking that the result of the first split has content. (Bitbake rev: 7662f8c8676d87cb318f811423cc02fe8cb146f6) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 07b7ae41b4..ee3d7b1672 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -290,7 +290,7 @@ class URI(object):
290 290
291 def _param_str_split(self, string, elmdelim, kvdelim="="): 291 def _param_str_split(self, string, elmdelim, kvdelim="="):
292 ret = collections.OrderedDict() 292 ret = collections.OrderedDict()
293 for k, v in [x.split(kvdelim, 1) for x in string.split(elmdelim)]: 293 for k, v in [x.split(kvdelim, 1) for x in string.split(elmdelim) if x]:
294 ret[k] = v 294 ret[k] = v
295 return ret 295 return ret
296 296