Skip to content

Commit 4586ddc

Browse files
authored
Merge pull request #653 from pinheadmz/fix-recent-logs
fix namespace bug in _logs()
2 parents 4d3302c + ca5be2a commit 4586ddc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/warnet/control.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,12 @@ def format_pods(pods: list[V1Pod]) -> list[str]:
398398
]
399399
selected = inquirer.prompt(q, theme=GreenPassion())
400400
if selected:
401-
pod_name, pod_namespace = selected["pod"].split(": ")
401+
pod_name, namespace = selected["pod"].split(": ")
402402
else:
403403
return # cancelled by user
404404

405405
try:
406-
pod = get_pod(pod_name, namespace=pod_namespace)
406+
pod = get_pod(pod_name, namespace=namespace)
407407
eligible_container_names = [BITCOINCORE_CONTAINER, COMMANDER_CONTAINER]
408408
available_container_names = [container.name for container in pod.spec.containers]
409409
container_name = next(
@@ -423,7 +423,7 @@ def format_pods(pods: list[V1Pod]) -> list[str]:
423423

424424
try:
425425
stream = pod_log(
426-
pod_name, container_name=container_name, namespace=pod_namespace, follow=follow
426+
pod_name, container_name=container_name, namespace=namespace, follow=follow
427427
)
428428
for line in stream:
429429
click.echo(line.decode("utf-8").rstrip())

0 commit comments

Comments
 (0)