]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/cephadm: fix incorrect return type
authorJohn Mulligan <jmulligan@redhat.com>
Sat, 20 Jan 2024 15:45:46 +0000 (10:45 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 23 Jan 2024 14:45:40 +0000 (09:45 -0500)
Found using mypy 0.990. Newer versions of mypy see that the callback
function passed to `addFilter` are expected to return a bool.  Update
`cherrypy_filter` to do have the correct type.

I did not try to fix the issue that this same function seems copy-pasted
into three different files. >:-}

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/cephadm/agent.py
src/pybind/mgr/cephadm/http_server.py
src/pybind/mgr/cephadm/service_discovery.py

index 93a08cb3439bdb9000af7b15fb62f067266caa30..ba9c21de07b68a4ccf52fab90a2a09e2b39ccba2 100644 (file)
@@ -29,7 +29,7 @@ if TYPE_CHECKING:
     from cephadm.module import CephadmOrchestrator
 
 
-def cherrypy_filter(record: logging.LogRecord) -> int:
+def cherrypy_filter(record: logging.LogRecord) -> bool:
     blocked = [
         'TLSV1_ALERT_DECRYPT_ERROR'
     ]
index ef29d3b4e7535618ee355d5fa2bb7ccb5365a371..56a87bdcf642f8008fc61bf6bd55642d4fc570e5 100644 (file)
@@ -12,7 +12,7 @@ if TYPE_CHECKING:
     from cephadm.module import CephadmOrchestrator
 
 
-def cherrypy_filter(record: logging.LogRecord) -> int:
+def cherrypy_filter(record: logging.LogRecord) -> bool:
     blocked = [
         'TLSV1_ALERT_DECRYPT_ERROR'
     ]
index ddc0574e2b12c4ae8cd36bd7cc8114b7d4cce986..b681cc8e7ff7b4ab40ab5fd902911ef3f9403bb1 100644 (file)
@@ -24,7 +24,7 @@ if TYPE_CHECKING:
     from cephadm.module import CephadmOrchestrator
 
 
-def cherrypy_filter(record: logging.LogRecord) -> int:
+def cherrypy_filter(record: logging.LogRecord) -> bool:
     blocked = [
         'TLSV1_ALERT_DECRYPT_ERROR'
     ]