From 5fe50f9a4018f21d36e3ef34d7af9f7b5d7016b9 Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Wed, 8 Sep 2021 12:38:01 +0100 Subject: 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 --- tools/binman/control.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tools/binman/control.py') diff --git a/tools/binman/control.py b/tools/binman/control.py index dcba02ff7f..0dbcbc28e9 100644 --- a/tools/binman/control.py +++ b/tools/binman/control.py @@ -565,12 +565,9 @@ def Binman(args): global state if args.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.rst') - command.Run(pager, fname) + tools.PrintFullHelp( + os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'README.rst') + ) return 0 # Put these here so that we can import this module without libfdt -- cgit v1.2.3