Skip to content

Commit bc7fbd1

Browse files
committed
control: remove contrived get_default_namespace
This use of get_default_namespace relies on the brittle idea that get_pods will always use get_default_namespace. Currently, get_pods currently does, in fact, use get_default_namespace. However, I don't like that we use get_default_namespace out of band relative to get_pods. I'd prefer that we do not mention namespaces at all in our message to users unless we can prove it.
1 parent 2033ff4 commit bc7fbd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/warnet/control.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,11 @@ def _logs(pod_name: str, follow: bool):
268268
pods = get_pods()
269269
pod_list = [item.metadata.name for item in pods.items]
270270
except Exception as e:
271-
print(f"Could not fetch any pods in namespace {namespace}: {e}")
271+
print(f"Could not fetch any pods: {e}")
272272
return
273273

274274
if not pod_list:
275-
print(f"Could not fetch any pods in namespace {namespace}")
275+
print("Could not fetch any pods")
276276
return
277277

278278
q = [

0 commit comments

Comments
 (0)