diff options
author | Simon Glass <sjg@chromium.org> | 2023-11-04 10:25:24 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-11-14 20:04:01 -0700 |
commit | abf7004321c05333afb56ae230095f9bee55e924 (patch) | |
tree | f25d260fff3c579fc9f06887638013d0cd0e652a | |
parent | dfdf621ff285da4e8e5995e05d570ebe7eb2e318 (diff) | |
download | u-boot-abf7004321c05333afb56ae230095f9bee55e924.zip u-boot-abf7004321c05333afb56ae230095f9bee55e924.tar.gz u-boot-abf7004321c05333afb56ae230095f9bee55e924.tar.bz2 |
patman: Correct Python 3.6 behaviour
The importlib_resources import is not actually used. Fix this so that
patman can run on Python 3.6 to some extent, once
'pip3 install importlib-resources' has been run.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rwxr-xr-x | tools/patman/__main__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/patman/__main__.py b/tools/patman/__main__.py index d53f686..f645b38 100755 --- a/tools/patman/__main__.py +++ b/tools/patman/__main__.py @@ -7,10 +7,10 @@ """See README for more information""" try: - import importlib.resources + from importlib import resources except ImportError: # for Python 3.6 - import importlib_resources + import importlib_resources as resources import os import re import sys @@ -69,7 +69,7 @@ def run_patman(): print(cca) elif args.full_help: - with importlib.resources.path('patman', 'README.rst') as readme: + with resources.path('patman', 'README.rst') as readme: tools.print_full_help(str(readme)) else: # If we are not processing tags, no need to warning about bad ones |