From: Simon Glass Date: Fri, 5 Sep 2014 19:00:11 -0600 Subject: [U-Boot] [PATCH v3 06/18] buildman: Move full help code into the control module In-Reply-To: <1409965223-29863-1-git-send-email-sjg@chromium.org> References: <1409965223-29863-1-git-send-email-sjg@chromium.org> Message-ID: <1409965223-29863-7-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v3: None Changes in v2: None tools/buildman/buildman.py | 6 ------ tools/buildman/control.py | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/buildman/buildman.py b/tools/buildman/buildman.py index c4de857..70c2142 100755 --- a/tools/buildman/buildman.py +++ b/tools/buildman/buildman.py @@ -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: diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 06c9229..408d9b1 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -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) -- 2.1.0.rc2.206.gedb03e5