import packaging only for docker container engine

Change-Id: If4e0c0e5d6ed5c79ca7d8a3c8f16bfa665f6968f
This commit is contained in:
Bartosz Bezak 2023-11-28 11:39:05 +01:00
parent a9b4c5361f
commit 81dc7a6b74

View File

@ -13,7 +13,6 @@
import contextlib import contextlib
import json import json
import logging import logging
import packaging
import queue import queue
import shutil import shutil
import sys import sys
@ -115,6 +114,7 @@ def run_build():
if conf.engine == engine.Engine.DOCKER.value: if conf.engine == engine.Engine.DOCKER.value:
try: try:
import docker import docker
import packaging
packaging.version.parse(docker.__version__) packaging.version.parse(docker.__version__)
except ImportError: except ImportError:
LOG.error("Error, you have set Docker as container engine, " LOG.error("Error, you have set Docker as container engine, "