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:
parent
1c6ca838b5
commit
c3906da781
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue