From f6c5aa9992e99a67db0a6715f8392b715474b49d Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sat, 21 Aug 2021 03:25:16 -0400 Subject: [PATCH] Avoid failing if no provisioner tasks --- client-cli/pvc/cli_lib/provisioner.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client-cli/pvc/cli_lib/provisioner.py b/client-cli/pvc/cli_lib/provisioner.py index 34c6e1b7..433ee3e3 100644 --- a/client-cli/pvc/cli_lib/provisioner.py +++ b/client-cli/pvc/cli_lib/provisioner.py @@ -707,7 +707,11 @@ def task_status(config, task_id=None, is_watching=False): # Format the Celery data into a more useful data structure task_data = list() for task_type in ['active', 'reserved', 'scheduled']: - type_data = task_data_raw[task_type] + try: + type_data = task_data_raw[task_type] + except Exception: + type_data = None + if not type_data: type_data = dict() for task_host in type_data: