Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
fix: Fix bug where the api response items weren't dereferenced before…
Browse files Browse the repository at this point in the history
… running len()
  • Loading branch information
Hoid committed May 1, 2024
1 parent 06298be commit 2216c7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tycho/kube.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def is_ambassador_context(self, namespace):
try:
field_sel_api_response = self.api.list_namespaced_service(field_selector="metadata.name=ambassador", namespace=namespace)
label_sel_api_response = self.api.list_namespaced_service(label_selector="app=ambassador", namespace=namespace)
num_of_services = len(field_sel_api_response) + len(label_sel_api_response)
num_of_services = len(field_sel_api_response.items) + len(label_sel_api_response.items)
if num_of_services > 0:
return True
else:
Expand Down

0 comments on commit 2216c7b

Please sign in to comment.