Re: [OE-core] [PATCH 1/1] oeqa/utils/commands.py: Fix get_bb_vars() when called without arguments
On 12/14/2016 10:04 AM, Lopez, Mariano wrote: On 12/14/2016 10:01 AM, Leonardo Sandoval wrote: On 12/14/2016 01:45 AM, mariano.lo...@linux.intel.com wrote: From: Mariano LopezCommit 9d55e9d489cd78be592fb9b4d6484f9060c62fdd broke calling get_bb_vars() when called without arguments. This fix this issue. Signed-off-by: Mariano Lopez --- meta/lib/oeqa/utils/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 6acb24a..aecf8cf 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -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() Is 'variables' type is a dict (or some derived type)? I see some get_bb_env calls using lists and lists do not have the copy method. I only see 3 calls in OE core, two of them uses None as first argument, and the last one uses a list, also if you check the function it will handle the argument as a list; so the function expect a list or None. And the list support the copy method, I just double check it: >>> l = [1,2,3] >>> l.copy() [1, 2, 3] Sorry, I was using the python2 interpreter when I was doing this check. P3 included the copy method on the list data structure. -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] oeqa/utils/commands.py: Fix get_bb_vars() when called without arguments
On 12/14/2016 10:01 AM, Leonardo Sandoval wrote: On 12/14/2016 01:45 AM, mariano.lo...@linux.intel.com wrote: From: Mariano LopezCommit 9d55e9d489cd78be592fb9b4d6484f9060c62fdd broke calling get_bb_vars() when called without arguments. This fix this issue. Signed-off-by: Mariano Lopez --- meta/lib/oeqa/utils/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 6acb24a..aecf8cf 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -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() Is 'variables' type is a dict (or some derived type)? I see some get_bb_env calls using lists and lists do not have the copy method. I only see 3 calls in OE core, two of them uses None as first argument, and the last one uses a list, also if you check the function it will handle the argument as a list; so the function expect a list or None. And the list support the copy method, I just double check it: >>> l = [1,2,3] >>> l.copy() [1, 2, 3] -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] oeqa/utils/commands.py: Fix get_bb_vars() when called without arguments
On 12/14/2016 01:45 AM, mariano.lo...@linux.intel.com wrote: From: Mariano LopezCommit 9d55e9d489cd78be592fb9b4d6484f9060c62fdd broke calling get_bb_vars() when called without arguments. This fix this issue. Signed-off-by: Mariano Lopez --- meta/lib/oeqa/utils/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 6acb24a..aecf8cf 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -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() Is 'variables' type is a dict (or some derived type)? I see some get_bb_env calls using lists and lists do not have the copy method. var_re = re.compile(r'^(export )?(?P\w+)="(?P.*)"$') unset_re = re.compile(r'^unset (?P\w+)$') lastline = None -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/1] oeqa/utils/commands.py: Fix get_bb_vars() when called without arguments
From: Mariano LopezCommit 9d55e9d489cd78be592fb9b4d6484f9060c62fdd broke calling get_bb_vars() when called without arguments. This fix this issue. Signed-off-by: Mariano Lopez --- meta/lib/oeqa/utils/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 6acb24a..aecf8cf 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -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\w+)="(?P.*)"$') unset_re = re.compile(r'^unset (?P\w+)$') lastline = None -- 2.6.6 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core