mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
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>
This commit is contained in:
parent
dfdf621ff2
commit
abf7004321
1 changed files with 3 additions and 3 deletions
|
@ -7,10 +7,10 @@
|
||||||
"""See README for more information"""
|
"""See README for more information"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import importlib.resources
|
from importlib import resources
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# for Python 3.6
|
# for Python 3.6
|
||||||
import importlib_resources
|
import importlib_resources as resources
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
@ -69,7 +69,7 @@ def run_patman():
|
||||||
print(cca)
|
print(cca)
|
||||||
|
|
||||||
elif args.full_help:
|
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))
|
tools.print_full_help(str(readme))
|
||||||
else:
|
else:
|
||||||
# If we are not processing tags, no need to warning about bad ones
|
# If we are not processing tags, no need to warning about bad ones
|
||||||
|
|
Loading…
Reference in a new issue