]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/nfs/cluster: fix type error
authorSage Weil <sage@newdream.net>
Wed, 2 Jun 2021 18:43:52 +0000 (14:43 -0400)
committerSage Weil <sage@newdream.net>
Thu, 17 Jun 2021 20:19:50 +0000 (16:19 -0400)
Signed-off-by: Sage Weil <sage@newdream.net>
src/pybind/mgr/nfs/cluster.py

index 232b590b44a214b66674a51ba87e846b07d0a91e..63f55dd6c9645b6b8d31e08957e47a8ec4b8d91a 100644 (file)
@@ -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)