Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/3] oeqa/commands: don't break if get_bb_vars is passed a tuple
@ 2017-11-22 16:04 Ross Burton
  2017-11-22 16:04 ` [PATCH 2/3] postinst: fix and simplify the postinst test recipe Ross Burton
  2017-11-22 16:04 ` [PATCH 3/3] oeqa/selftest/runtime_test: simplify postinst testing Ross Burton
  0 siblings, 2 replies; 9+ messages in thread
From: Ross Burton @ 2017-11-22 16:04 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/lib/oeqa/utils/commands.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 0bb90028dc6..cad0bea0be9 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -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
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-11-23 12:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-22 16:04 [PATCH 1/3] oeqa/commands: don't break if get_bb_vars is passed a tuple Ross Burton
2017-11-22 16:04 ` [PATCH 2/3] postinst: fix and simplify the postinst test recipe Ross Burton
2017-11-22 16:09   ` Alexander Kanavin
2017-11-22 16:09     ` Burton, Ross
2017-11-22 16:13       ` Alexander Kanavin
2017-11-22 16:04 ` [PATCH 3/3] oeqa/selftest/runtime_test: simplify postinst testing Ross Burton
2017-11-23  1:34   ` Joshua Lock
2017-11-23 10:21     ` Burton, Ross
2017-11-23 12:08       ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox