]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: do not use bare 'except' (E722)
authorMichael Fritch <mfritch@suse.com>
Thu, 18 Feb 2021 22:25:27 +0000 (15:25 -0700)
committerSage Weil <sage@newdream.net>
Tue, 16 Mar 2021 12:56:16 +0000 (07:56 -0500)
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 8eb4c38f10251386b190194dd12f2787b083e383)

src/cephadm/cephadm
src/cephadm/tox.ini

index d89b874e252e2f573912eb092b877bf8501185bb..8e17742084379da2b607824a955b54c6c4f33b53 100755 (executable)
@@ -4056,7 +4056,7 @@ def registry_login(ctx: CephadmContext, url, username, password):
         out, _, _ = call_throws(ctx, cmd)
         if 'podman' in container_path:
             os.chmod('/etc/ceph/podman-auth.json', 0o600)
-    except:
+    except Exception:
         raise Error("Failed to login to custom registry @ %s as %s with given password" % (ctx.registry_url, ctx.registry_username))
 
 ##################################
index 32d09664ebe462ffe0287638f44f9a6cfc706651..bed007711cdc173de4d95463c8ad9482305ddd3c 100644 (file)
@@ -6,7 +6,6 @@ skipsdist=true
 max-line-length = 100
 ignore =
     E501,
-    E722,
     E741,
     F401,
     F841,