]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: black format container_engines.py
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 16 Aug 2023 19:59:02 +0000 (15:59 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 30 Aug 2023 18:02:15 +0000 (14:02 -0400)
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Pair-programmed-with: Adam King <adking@redhat.com>
Co-authored-by: Adam King <adking@redhat.com>
src/cephadm/cephadmlib/container_engines.py

index 4c3611cbea3b1984fb4282c0512744ffad692bc8..01b22bd80e8f18ed4994bff6191042ca3af1b299 100644 (file)
@@ -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 <container engine>`'.format(' or '.join(exes)))
+        raise Error(
+            'No container engine binary found ({}). Try run `apt/dnf/yum/zypper install <container engine>`'.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