cli (base): Flush output on self.disp:

When `li` stdout was redirected (e.g. with a pipe), the buffer was preventing to display
immediately data, which is a problem when we need it immediately (like when monitoring
with `li debug monitor`). Flushing is now done immediately to avoid that.
This commit is contained in:
Goffi 2026-05-04 16:28:47 +02:00
commit c3906da781

View file

@ -326,9 +326,9 @@ class LiberviaCli:
"""
if self.verbosity >= verbosity:
if error:
print(msg, end=end, file=sys.stderr)
print(msg, end=end, file=sys.stderr, flush=True)
else:
print(msg, end=end)
print(msg, end=end, flush=True)
async def output(self, type_, name, extra_outputs, data):
if name in extra_outputs: