[PATCH 01/24] qconfig: Fix pylint error in read_database()

Simon Glass sjg at chromium.org
Wed Jul 17 17:56:49 CEST 2024


Fix this error by initing the variable before the loop:

tools/qconfig.py:880:22: E0606: Possibly using variable 'defconfig'
   before assignment (possibly-used-before-assignment)

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 tools/qconfig.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/qconfig.py b/tools/qconfig.py
index 04118d942da..2492b37444a 100755
--- a/tools/qconfig.py
+++ b/tools/qconfig.py
@@ -873,6 +873,7 @@ def read_database():
     all_defconfigs = set()
 
     defconfig_db = collections.defaultdict(set)
+    defconfig = None
     for line in read_file(CONFIG_DATABASE):
         line = line.rstrip()
         if not line:  # Separator between defconfigs
-- 
2.34.1



More information about the U-Boot mailing list