From c73939e1c548dbe750deb6e538428202445c0c29 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 28 Dec 2021 21:03:10 -0500 Subject: [PATCH] Fix issue if pool stats have not updated yet --- daemon-common/ceph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon-common/ceph.py b/daemon-common/ceph.py index e71da5cd..f4adebd8 100644 --- a/daemon-common/ceph.py +++ b/daemon-common/ceph.py @@ -544,7 +544,7 @@ def get_list_pool(zkhandler, limit, is_fuzzy=True): for future in futures: pool_data_list.append(future.result()) - return True, sorted(pool_data_list, key=lambda x: int(x["stats"]["id"])) + return True, sorted(pool_data_list, key=lambda x: int(x["stats"].get("id", 0))) #