From: Michael Fritch Date: Thu, 18 Feb 2021 22:15:48 +0000 (-0700) Subject: cephadm: expected 1 blank line before a nested definition (E306) X-Git-Tag: v17.1.0~2749^2~14 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6c8ea9fb65cb63db0aac4d53d507e21a0f85d726;p=ceph.git cephadm: expected 1 blank line before a nested definition (E306) Signed-off-by: Michael Fritch --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 808020dd899db..b4dd2564b9fc7 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 d67c12421b3e4..62afb0f0be131 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,