]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: mypy says: dd.status can be None
authorSebastian Wagner <sebastian.wagner@suse.com>
Fri, 22 Jan 2021 10:32:31 +0000 (11:32 +0100)
committerSebastian Wagner <sebastian.wagner@suse.com>
Fri, 22 Jan 2021 10:32:31 +0000 (11:32 +0100)
`DaemonDescription.status` is annotated
as `Optional[int]` and thus can be `None`

This is a conflict between c95ba878c66aae44816b1451049449685d444f0a
and 01f60cf4e0a751c314120c02956d4ff941eb71b4

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
src/pybind/mgr/cephadm/serve.py

index 5c9d1766520a2e233d98a263e863c29d1b57a0ed..3e4a62013d47abf26be20cde76fe030ca1aa330d 100644 (file)
@@ -197,7 +197,7 @@ class CephadmServe:
             health_changed = True
         failed_daemons = []
         for dd in self.mgr.cache.get_daemons():
-            if dd.status < 0:
+            if dd.status is not None and dd.status < 0:
                 failed_daemons.append('daemon %s on %s is in %s state' % (
                     dd.name(), dd.hostname, dd.status_desc
                 ))