]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
qconfig: Fix pylint error in read_database()
authorSimon Glass <sjg@chromium.org>
Wed, 17 Jul 2024 15:56:49 +0000 (16:56 +0100)
committerSimon Glass <sjg@chromium.org>
Fri, 26 Jul 2024 14:01:05 +0000 (08:01 -0600)
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@chromium.org>
tools/qconfig.py

index 04118d942da6da91cb63c0eba478afd2eb6323e6..2492b37444a3e0294a84e91272a87ded33eb9e81 100755 (executable)
@@ -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