From 22d6a1b7d8ce5530ef67f2ea8b1a9f9681dedf3a Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Thu, 28 Jan 2021 12:43:10 -0700 Subject: [PATCH] mgr/cephadm: f-string is missing placeholders (F541) Signed-off-by: Michael Fritch --- src/pybind/mgr/cephadm/module.py | 4 ++-- src/pybind/mgr/cephadm/serve.py | 2 +- src/pybind/mgr/tox.ini | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index e45bd07ae35..23e1277d497 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -524,7 +524,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule, # if _ANY_ osd that is currently in the queue appears to be empty, # start the removal process if int(osd.get('osd')) in self.to_remove_osds.as_osd_ids(): - self.log.debug(f"Found empty osd. Starting removal process") + self.log.debug('Found empty osd. Starting removal process') # if the osd that is now empty is also part of the removal queue # start the process self._kick_serve_loop() @@ -1333,7 +1333,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule, :raises OrchestratorError: Hostname is invalid, host is already in maintenance """ if len(self.cache.get_hosts()) == 1: - raise OrchestratorError(f"Maintenance feature is not supported on single node clusters") + raise OrchestratorError("Maintenance feature is not supported on single node clusters") # if upgrade is active, deny if self.upgrade.upgrade_state: diff --git a/src/pybind/mgr/cephadm/serve.py b/src/pybind/mgr/cephadm/serve.py index 71d3678b2c0..66f33529be6 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -329,7 +329,7 @@ class CephadmServe: # query OSDSpecs for host and generate/get the preview # There can be multiple previews for one host due to multiple OSDSpecs. previews.extend(self.mgr.osd_service.get_previews(search_host)) - self.log.debug(f"Loading OSDSpec previews to HostCache") + self.log.debug(f'Loading OSDSpec previews to HostCache for host <{search_host}>') self.mgr.cache.osdspec_previews[search_host] = previews # Unset global 'pending' flag for host self.mgr.cache.loading_osdspec_preview.remove(search_host) diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index 96f9c3400e5..cb88ec4d0e6 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -13,7 +13,6 @@ max-line-length = 100 ignore = E501, F401, - F541, F632, F811, F821, -- 2.39.5