[RFC,CFH,sumo,16/47] cve-check.bbclass: initialize to_append

Submitted by Mikko Rapeli on Nov. 6, 2019, 3:37 p.m. | Patch ID: 166648

Details

Message ID 9ba01b91766ad56c7744a9ba97636a1616d71a8c.1573047194.git.mikko.rapeli@bmw.de
State New
Headers show

Commit Message

Mikko Rapeli Nov. 6, 2019, 3:37 p.m.
Fixes build failure with core-image-minimal:

Exception: UnboundLocalError: local variable 'to_append' referenced before assignment

(From OE-Core rev: 270ac00cb43d0614dfe1c95f960c76e9e5fa20d4)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/cve-check.bbclass | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 19ac48c..2a13816 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -207,6 +207,7 @@  def check_cves(d, patched_cves):
             elif cve in patched_cves:
                 bb.note("%s has been patched" % (cve))
             else:
+                to_append = False
                 if (operator_start == '=' and pv == version_start):
                     cves_unpatched.append(cve)
                 else: