Skip to content

Commit c67154a

Browse files
committed
do try..except on get_pods
1 parent b6f1619 commit c67154a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/warnet/k8s.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ def get_dynamic_client() -> DynamicClient:
2424

2525
def get_pods() -> V1PodList:
2626
sclient = get_static_client()
27-
return sclient.list_namespaced_pod(get_default_namespace())
27+
try:
28+
pod_list: V1PodList = sclient.list_namespaced_pod(get_default_namespace())
29+
except Exception as e:
30+
raise e
31+
return pod_list
2832

2933

3034
def get_mission(mission: str) -> list[V1PodList]:

0 commit comments

Comments
 (0)