From: Sebastian Wagner Date: Fri, 22 Jan 2021 10:32:31 +0000 (+0100) Subject: mgr/cephadm: mypy says: dd.status can be None X-Git-Tag: v17.0.0~3^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=fb1976950372502c5d3dcfee86288724771cffbf;p=ceph.git mgr/cephadm: mypy says: dd.status can be None `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 --- diff --git a/src/pybind/mgr/cephadm/serve.py b/src/pybind/mgr/cephadm/serve.py index 5c9d1766520a2..3e4a62013d47a 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -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 ))