From 6c8ea9fb65cb63db0aac4d53d507e21a0f85d726 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Thu, 18 Feb 2021 15:15:48 -0700 Subject: [PATCH] cephadm: expected 1 blank line before a nested definition (E306) Signed-off-by: Michael Fritch --- src/cephadm/cephadm | 3 +++ src/cephadm/tox.ini | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 808020dd899d..b4dd2564b9fc 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -982,6 +982,7 @@ def port_in_use(ctx, port_num): # type: (CephadmContext, int) -> bool """Detect whether a port is in use on the local machine - IPv4 and IPv6""" logger.info('Verifying port %d ...' % port_num) + def _port_in_use(af: socket.AddressFamily, address: str) -> bool: try: s = socket.socket(af, socket.SOCK_STREAM) @@ -3931,8 +3932,10 @@ def command_bootstrap(ctx): out = cli(['mgr', 'dump']) j = json.loads(out) epoch = j['epoch'] + # wait for mgr to have it logger.info('Waiting for the mgr to restart...') + def mgr_has_latest_epoch(): # type: () -> bool try: diff --git a/src/cephadm/tox.ini b/src/cephadm/tox.ini index d67c12421b3e..62afb0f0be13 100644 --- a/src/cephadm/tox.ini +++ b/src/cephadm/tox.ini @@ -5,7 +5,6 @@ skipsdist=true [flake8] max-line-length = 100 ignore = - E306, E402, E501, E703, -- 2.47.3