Loading behave_utils/docker.py +7 −8 Original line number Diff line number Diff line # Copyright 2021-2023 Dominik Sekotill <dom.sekotill@kodo.org.uk> # Copyright 2021-2024 Dominik Sekotill <dom.sekotill@kodo.org.uk> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this Loading Loading @@ -26,6 +26,7 @@ from os import environ from os import fspath from pathlib import Path from secrets import token_hex from shutil import which from subprocess import DEVNULL from subprocess import PIPE from subprocess import CalledProcessError Loading Loading @@ -69,13 +70,11 @@ Volumes = MutableSequence[Mount] IPAddress = Union[ipaddress.IPv4Address, ipaddress.IPv6Address] try: run([b"docker", b"version"], stdout=DEVNULL) except FileNotFoundError: match which("docker"): case None: DOCKER: Argument = DownloadableDocker().get_binary() else: DOCKER = b"docker" case str(path): DOCKER = Path(path) def utf8_decode(buffer: bytes) -> str: Loading Loading
behave_utils/docker.py +7 −8 Original line number Diff line number Diff line # Copyright 2021-2023 Dominik Sekotill <dom.sekotill@kodo.org.uk> # Copyright 2021-2024 Dominik Sekotill <dom.sekotill@kodo.org.uk> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this Loading Loading @@ -26,6 +26,7 @@ from os import environ from os import fspath from pathlib import Path from secrets import token_hex from shutil import which from subprocess import DEVNULL from subprocess import PIPE from subprocess import CalledProcessError Loading Loading @@ -69,13 +70,11 @@ Volumes = MutableSequence[Mount] IPAddress = Union[ipaddress.IPv4Address, ipaddress.IPv6Address] try: run([b"docker", b"version"], stdout=DEVNULL) except FileNotFoundError: match which("docker"): case None: DOCKER: Argument = DownloadableDocker().get_binary() else: DOCKER = b"docker" case str(path): DOCKER = Path(path) def utf8_decode(buffer: bytes) -> str: Loading