Skip to content

Commit d684623

Browse files
committed
fix: replace iter with list
1 parent fc8d42a commit d684623

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

utilities/infra.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,10 @@ def is_managed_cluster(client: DynamicClient) -> bool:
368368

369369
platform_statuses = infra.instance.status.platformStatus
370370

371-
for entries in platform_statuses.values():
372-
if isinstance(entries, kubernetes.dynamic.resource.ResourceField):
373-
if tags := entries.resourceTags:
374-
return next(b["value"] == "true" for b in tags if b["key"] == "red-hat-managed")
371+
for entry in platform_statuses.values():
372+
if isinstance(entry, kubernetes.dynamic.resource.ResourceField):
373+
if tags := entry.resourceTags:
374+
return any([tag["value"] == "true" for tag in tags if tag["key"] == "red-hat-managed"])
375375

376376
return False
377377

0 commit comments

Comments
 (0)