diff options
author | Paul Barker <paul.barker@sancloud.com> | 2021-09-08 12:38:01 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-09-24 14:30:46 -0400 |
commit | 5fe50f9a4018f21d36e3ef34d7af9f7b5d7016b9 (patch) | |
tree | eabe72bc1f7e2fc848616999485161ace286f71a /tools/buildman | |
parent | 15e30106ce624ade62ba87c2defe7ea67c88f1b5 (diff) | |
download | u-boot-5fe50f9a4018f21d36e3ef34d7af9f7b5d7016b9.tar.gz |
tools: Refactor full help printing
Collect the code for printing the full help message of patman, buildman
and binman into a single function in patman.tools.
Signed-off-by: Paul Barker <paul.barker@sancloud.com>
Diffstat (limited to 'tools/buildman')
-rw-r--r-- | tools/buildman/control.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py index a98d1b4c06f..fd9664c85d8 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -16,6 +16,7 @@ from patman import command from patman import gitutil from patman import patchstream from patman import terminal +from patman import tools from patman.terminal import Print def GetPlural(count): @@ -133,12 +134,9 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, global builder if options.full_help: - pager = os.getenv('PAGER') - if not pager: - pager = 'more' - fname = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), - 'README') - command.Run(pager, fname) + tools.PrintFullHelp( + os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'README') + ) return 0 gitutil.Setup() |