]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
qconfig: Move arg checking a little higher
authorSimon Glass <sjg@chromium.org>
Wed, 17 Jul 2024 15:56:56 +0000 (16:56 +0100)
committerSimon Glass <sjg@chromium.org>
Fri, 26 Jul 2024 14:01:06 +0000 (08:01 -0600)
Check for scan_source as one of the possible operations for this tool,
moving the check above the scan_source implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/qconfig.py

index d8f0a716fe952d641151b8b5fc147a9a3612fe3e..6d263ce30db2f5520f7152587e32d87b5e5576f9 100755 (executable)
@@ -1534,14 +1534,15 @@ def main():
     col = terminal.Color(terminal.COLOR_NEVER if args.nocolour
                          else terminal.COLOR_IF_TERMINAL)
 
+    if not any((args.force_sync, args.build_db, args.imply, args.find,
+                args.scan_source)):
+        parser.print_usage()
+        sys.exit(1)
+
     if args.scan_source:
         do_scan_source(os.getcwd(), args.update)
         return 0
 
-    if not any((args.force_sync, args.build_db, args.imply, args.find)):
-        parser.print_usage()
-        sys.exit(1)
-
     # prefix the option name with CONFIG_ if missing
     configs = [prefix_config(cfg) for cfg in args.configs]