]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/utils/commands.py: Fix get_bb_vars() when called without arguments
authorMariano Lopez <mariano.lopez@linux.intel.com>
Wed, 14 Dec 2016 07:45:21 +0000 (07:45 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 14 Dec 2016 16:14:59 +0000 (16:14 +0000)
Commit 9d55e9d489cd78be592fb9b4d6484f9060c62fdd broke calling get_bb_vars()
when called without arguments. This fix this issue.

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/commands.py

index 6acb24a2b7d30b1637549d97143d3e92f9c49df7..aecf8cf5a8c743c5860506981b752a760ef8154a 100644 (file)
@@ -149,7 +149,8 @@ def get_bb_vars(variables=None, target=None, postconfig=None):
     """Get values of multiple bitbake variables"""
     bbenv = get_bb_env(target, postconfig=postconfig)
 
-    variables = variables.copy()
+    if variables is not None:
+        variables = variables.copy()
     var_re = re.compile(r'^(export )?(?P<var>\w+)="(?P<value>.*)"$')
     unset_re = re.compile(r'^unset (?P<var>\w+)$')
     lastline = None