mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
bitbake: Fix default function parameter assignment to a list
With python you should not assign a list as the default value of a function parameter - because a list is mutable, the result will be that the first time a value is passed it will actually modify the default. Reference: http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments (Bitbake rev: 7859f7388f2e3f675d0e1527cfde18625f36f637) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
22a653d028
commit
715d857174
@@ -522,7 +522,9 @@ def builddashboard( request, build_id ):
|
||||
|
||||
|
||||
|
||||
def generateCoveredList2( revlist = [] ):
|
||||
def generateCoveredList2( revlist = None ):
|
||||
if not revlist:
|
||||
revlist = []
|
||||
covered_list = [ x for x in revlist if x.outcome == Task.OUTCOME_COVERED ]
|
||||
while len(covered_list):
|
||||
revlist = [ x for x in revlist if x.outcome != Task.OUTCOME_COVERED ]
|
||||
|
||||
Reference in New Issue
Block a user