From: Sage Weil Date: Wed, 2 Jun 2021 18:43:52 +0000 (-0400) Subject: mgr/nfs/cluster: fix type error X-Git-Tag: v17.1.0~1551^2~35 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f9d291b5755520feca393c7fca964de999a6e90a;p=ceph.git mgr/nfs/cluster: fix type error Signed-off-by: Sage Weil --- diff --git a/src/pybind/mgr/nfs/cluster.py b/src/pybind/mgr/nfs/cluster.py index 232b590b44a2..63f55dd6c964 100644 --- a/src/pybind/mgr/nfs/cluster.py +++ b/src/pybind/mgr/nfs/cluster.py @@ -161,7 +161,7 @@ class NFSCluster: else: c = self.mgr.get_hosts() orchestrator.raise_if_exception(c) - hosts = [h for h in c.result + hosts = [h for h in c.result or [] if h.hostname == cluster.hostname] if hosts: ip = resolve_ip(hosts[0].addr)