Skip to content

Commit 70f7da3

Browse files
author
Bhautik Vala
committed
[patch] Fix field not found in listInstances
1 parent 7e6e64b commit 70f7da3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mas/devops/ocp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def listInstances(dynClient: DynamicClient, apiVersion: str, kind: str) -> list:
252252
if len(instances) > 0:
253253
logger.info(f"There are {len(instances)} {kind} instances installed on this cluster:")
254254
for instance in instances:
255-
logger.info(f" * {instance['metadata']['name']} v{instance['status']['versions']['reconciled']}")
255+
logger.info(f" * {instance['metadata']['name']} v{instance.get('status', {}).get('versions', {}).get('reconciled', 'N/A')}")
256256
else:
257257
logger.info(f"There are no {kind} instances installed on this cluster")
258258
return instances

0 commit comments

Comments
 (0)