1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 13:29:49 +00:00

oeqa/commands: don't break if get_bb_vars is passed a tuple

get_bb_vars was using variables.copy() to duplicate the list of variables passed
but this function only exists in lists [1,2] and not tuples (1,2).

Instead of throwing an exception if the variables are in a tuple, simply
construct a new list using the passed sequence-like object.

(From OE-Core rev: b5837f62c8af94d134cf2160afdfb9e08b3418d1)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2017-11-22 15:56:54 +00:00
committed by Richard Purdie
parent 6ef494c13b
commit 6436ffbb02
+1 -1
View File
@@ -227,7 +227,7 @@ def get_bb_vars(variables=None, target=None, postconfig=None):
bbenv = get_bb_env(target, postconfig=postconfig)
if variables is not None:
variables = variables.copy()
variables = list(variables)
var_re = re.compile(r'^(export )?(?P<var>\w+(_.*)?)="(?P<value>.*)"$')
unset_re = re.compile(r'^unset (?P<var>\w+)$')
lastline = None