From 9b51fe9f1009c7dda3e54f697435040a4e170662 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 29 Jan 2024 09:21:02 -0500 Subject: [PATCH] Use get() for newer keys in client --- client-cli/pvc/lib/storage.py | 2 +- client-cli/pvc/lib/vm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client-cli/pvc/lib/storage.py b/client-cli/pvc/lib/storage.py index 642b639e..acf1512e 100644 --- a/client-cli/pvc/lib/storage.py +++ b/client-cli/pvc/lib/storage.py @@ -430,7 +430,7 @@ def format_list_osd(config, osd_list): ) continue - if osd_information["is_split"]: + if osd_information.get("is_split") is not None: osd_information["device"] = f"{osd_information['device']} [s]" # Deal with the size to human readable diff --git a/client-cli/pvc/lib/vm.py b/client-cli/pvc/lib/vm.py index 2d17dd14..def035f7 100644 --- a/client-cli/pvc/lib/vm.py +++ b/client-cli/pvc/lib/vm.py @@ -1717,7 +1717,7 @@ def format_info(config, domain_information, long_output): "{}Max live downtime:{} {}".format( ansiprint.purple(), ansiprint.end(), - f"{domain_information['migration_max_downtime']} ms", + f"{domain_information.get('migration_max_downtime')} ms", ) )