diff options
author | Jan Kiszka | 2023-04-22 16:42:48 +0200 |
---|---|---|
committer | Simon Glass | 2023-04-28 11:49:00 -0600 |
commit | de65b122a2534a5bc61f7714f10125baee5d58f3 (patch) | |
tree | a7971e5c583323dd06e392819b80f0882ef7ce4b /tools/buildman/control.py | |
parent | f53e973b84d5b60439c8f0cc98099c020b3ab83a (diff) |
tools: Fall back to importlib_resources on Python 3.6
importlib.resources became part of 3.7 only. Allow using distros with
3.6 and the importlib_resources backport.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/control.py')
-rw-r--r-- | tools/buildman/control.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 35f44c0cf3d..09a11f25b3f 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -3,7 +3,11 @@ # import multiprocessing -import importlib.resources +try: + import importlib.resources +except ImportError: + # for Python 3.6 + import importlib_resources import os import shutil import subprocess |