Skip to content

Commit 0402037

Browse files
committed
control: improve stream handling
Using `print` causes [tags] to get interpreted as color codes.
1 parent 7013ad7 commit 0402037

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/warnet/control.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ def _logs(pod_name: str, follow: bool):
369369
return # cancelled by user
370370

371371
try:
372-
stream = pod_log(pod_name, container_name=None, follow=follow)
373-
for line in stream.stream():
374-
print(line.decode("utf-8"), end=None)
372+
stream = pod_log(pod_name, container_name=None, follow=follow, namespace=pod_namespace)
373+
for line in stream:
374+
click.echo(line.decode("utf-8").rstrip())
375375
except Exception as e:
376376
print(e)
377377
except KeyboardInterrupt:

0 commit comments

Comments
 (0)