From: Adam King Date: Wed, 27 Sep 2023 19:24:43 +0000 (-0400) Subject: cephadm: re-format black container_engines.py X-Git-Tag: v19.0.0~383^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F53702%2Fhead;p=ceph.git cephadm: re-format black container_engines.py Signed-off-by: Adam King --- diff --git a/src/cephadm/cephadmlib/container_engines.py b/src/cephadm/cephadmlib/container_engines.py index 9a3d5f7dbe90..396161906431 100644 --- a/src/cephadm/cephadmlib/container_engines.py +++ b/src/cephadm/cephadmlib/container_engines.py @@ -89,16 +89,22 @@ def _parse_podman_version(version_str): return tuple(map(to_int, version_str.split('.'))) -def registry_login(ctx: CephadmContext, url: Optional[str], username: Optional[str], password: Optional[str]) -> None: +def registry_login( + ctx: CephadmContext, + url: Optional[str], + username: Optional[str], + password: Optional[str], +) -> None: try: engine = ctx.container_engine - cmd = [engine.path, 'login', - '-u', username, '-p', password, - url] + cmd = [engine.path, 'login', '-u', username, '-p', password, url] if isinstance(engine, Podman): cmd.append('--authfile=/etc/ceph/podman-auth.json') out, _, _ = call_throws(ctx, cmd) if isinstance(engine, Podman): os.chmod('/etc/ceph/podman-auth.json', DEFAULT_MODE) except Exception: - raise Error('Failed to login to custom registry @ %s as %s with given password' % (ctx.registry_url, ctx.registry_username)) + raise Error( + 'Failed to login to custom registry @ %s as %s with given password' + % (ctx.registry_url, ctx.registry_username) + )