From a32b93fee0f838920e10d7bef93145066373a383 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Wed, 16 Aug 2023 15:59:02 -0400 Subject: [PATCH] cephadm: black format container_engines.py Signed-off-by: John Mulligan Pair-programmed-with: Adam King Co-authored-by: Adam King --- src/cephadm/cephadmlib/container_engines.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/cephadm/cephadmlib/container_engines.py b/src/cephadm/cephadmlib/container_engines.py index 4c3611cbea3..01b22bd80e8 100644 --- a/src/cephadm/cephadmlib/container_engines.py +++ b/src/cephadm/cephadmlib/container_engines.py @@ -24,7 +24,11 @@ class Podman(ContainerEngine): return self._version def get_version(self, ctx: CephadmContext) -> None: - out, _, _ = call_throws(ctx, [self.path, 'version', '--format', '{{.Client.Version}}'], verbosity=CallVerbosity.QUIET) + out, _, _ = call_throws( + ctx, + [self.path, 'version', '--format', '{{.Client.Version}}'], + verbosity=CallVerbosity.QUIET, + ) self._version = _parse_podman_version(out) def __str__(self) -> str: @@ -56,11 +60,18 @@ def check_container_engine(ctx: CephadmContext) -> ContainerEngine: if not isinstance(engine, CONTAINER_PREFERENCE): # See https://github.com/python/mypy/issues/8993 exes: List[str] = [i.EXE for i in CONTAINER_PREFERENCE] # type: ignore - raise Error('No container engine binary found ({}). Try run `apt/dnf/yum/zypper install `'.format(' or '.join(exes))) + raise Error( + 'No container engine binary found ({}). Try run `apt/dnf/yum/zypper install `'.format( + ' or '.join(exes) + ) + ) elif isinstance(engine, Podman): engine.get_version(ctx) if engine.version < MIN_PODMAN_VERSION: - raise Error('podman version %d.%d.%d or later is required' % MIN_PODMAN_VERSION) + raise Error( + 'podman version %d.%d.%d or later is required' + % MIN_PODMAN_VERSION + ) return engine -- 2.39.5