From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mail.openembedded.org (Postfix) with ESMTP id 109A177236 for ; Wed, 14 Dec 2016 15:55:30 +0000 (UTC) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP; 14 Dec 2016 07:55:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,347,1477983600"; d="scan'208";a="39928486" Received: from lsandov1-mobl2.zpn.intel.com (HELO [10.219.128.142]) ([10.219.128.142]) by orsmga004.jf.intel.com with ESMTP; 14 Dec 2016 07:55:31 -0800 To: mariano.lopez@linux.intel.com, openembedded-core@lists.openembedded.org References: <78c9c118e58c8b406baddaae656e791d7238f198.1481701176.git.mariano.lopez@linux.intel.com> From: Leonardo Sandoval Message-ID: Date: Wed, 14 Dec 2016 10:01:36 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <78c9c118e58c8b406baddaae656e791d7238f198.1481701176.git.mariano.lopez@linux.intel.com> Subject: Re: [PATCH 1/1] oeqa/utils/commands.py: Fix get_bb_vars() when called without arguments X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 15:55:31 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 12/14/2016 01:45 AM, mariano.lopez@linux.intel.com wrote: > From: Mariano Lopez > > Commit 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