mirror of
https://github.com/beetbox/beets.git
synced 2026-01-05 15:33:15 +01:00
Flush the stdout buffer after printing a line
Pointed out in #2490, this is a regression introduced by #2398. We need to flush the buffer to faithfully emulate the "real" print() function.
This commit is contained in:
parent
920784a42d
commit
9446ec7f46
1 changed files with 1 additions and 0 deletions
|
|
@ -148,6 +148,7 @@ def print_(*strings, **kwargs):
|
|||
if hasattr(sys.stdout, 'buffer'):
|
||||
out = txt.encode(_out_encoding(), 'replace')
|
||||
sys.stdout.buffer.write(out)
|
||||
sys.stdout.buffer.flush()
|
||||
else:
|
||||
# In our test harnesses (e.g., DummyOut), sys.stdout.buffer
|
||||
# does not exist. We instead just record the text string.
|
||||
|
|
|
|||
Loading…
Reference in a new issue