From: Sage Weil Date: Wed, 2 Jun 2021 18:43:52 +0000 (-0400) Subject: mgr/nfs/cluster: fix type error X-Git-Tag: v16.2.7~116^2~100 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b27eb773b0592e87b0b81130c56345d272f8a205;p=ceph.git mgr/nfs/cluster: fix type error Signed-off-by: Sage Weil (cherry picked from commit f9d291b5755520feca393c7fca964de999a6e90a) --- diff --git a/src/pybind/mgr/nfs/cluster.py b/src/pybind/mgr/nfs/cluster.py index 232b590b44a..63f55dd6c96 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)