mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-09-21 07:01:57 +00:00
binman: Use importlib to find the help
Use this function so that the help can be found even when binman is running from a package. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
94bb5cd2f9
commit
8de6adbf4a
1 changed files with 3 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
from collections import OrderedDict
|
||||
import glob
|
||||
import importlib.resources
|
||||
import os
|
||||
import pkg_resources
|
||||
import re
|
||||
|
@ -641,9 +642,8 @@ def Binman(args):
|
|||
global state
|
||||
|
||||
if args.full_help:
|
||||
tools.print_full_help(
|
||||
os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'README.rst')
|
||||
)
|
||||
with importlib.resources.path('binman', 'README.rst') as readme:
|
||||
tools.print_full_help(str(readme))
|
||||
return 0
|
||||
|
||||
# Put these here so that we can import this module without libfdt
|
||||
|
|
Loading…
Reference in a new issue