Skip to content

Commit

Permalink
Merge pull request #653 from pinheadmz/fix-recent-logs
Browse files Browse the repository at this point in the history
fix namespace bug in _logs()
  • Loading branch information
pinheadmz authored Oct 15, 2024
2 parents 4d3302c + ca5be2a commit 4586ddc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/warnet/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,12 @@ def format_pods(pods: list[V1Pod]) -> list[str]:
]
selected = inquirer.prompt(q, theme=GreenPassion())
if selected:
pod_name, pod_namespace = selected["pod"].split(": ")
pod_name, namespace = selected["pod"].split(": ")
else:
return # cancelled by user

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

try:
stream = pod_log(
pod_name, container_name=container_name, namespace=pod_namespace, follow=follow
pod_name, container_name=container_name, namespace=namespace, follow=follow
)
for line in stream:
click.echo(line.decode("utf-8").rstrip())
Expand Down

0 comments on commit 4586ddc

Please sign in to comment.