]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
buildman: Move full help code into the control module
authorSimon Glass <sjg@chromium.org>
Sat, 6 Sep 2014 01:00:11 +0000 (19:00 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 9 Sep 2014 22:38:27 +0000 (16:38 -0600)
There is no good reason to keep this code separate. Move it into control.py
so it is easier to test.

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

index c4de857d996f643a91dfbe469720493beaf09020..70c2142901737e5fb2b97def38a2e1700371920a 100755 (executable)
@@ -63,12 +63,6 @@ options, args = cmdline.ParseArgs()
 # Run our meagre tests
 if options.test:
     RunTests()
-elif options.full_help:
-    pager = os.getenv('PAGER')
-    if not pager:
-        pager = 'more'
-    fname = os.path.join(os.path.dirname(sys.argv[0]), 'README')
-    command.Run(pager, fname)
 
 # Build selected commits for selected boards
 else:
index 06c9229fba66b397f8a106d3261e6ff57f13a654..408d9b126bb7a7d98e89bccc6923fd7f02d5833f 100644 (file)
@@ -84,6 +84,14 @@ def DoBuildman(options, args):
         options: Command line options object
         args: Command line arguments (list of strings)
     """
+    if options.full_help:
+        pager = os.getenv('PAGER')
+        if not pager:
+            pager = 'more'
+        fname = os.path.join(os.path.dirname(sys.argv[0]), 'README')
+        command.Run(pager, fname)
+        return 0
+
     gitutil.Setup()
 
     bsettings.Setup(options.config_file)