mirror of
https://github.com/beetbox/beets.git
synced 2026-01-08 08:56:56 +01:00
Merge pull request #2496 from beetbox/2490-bufferflush
Flush the stdout buffer after printing a line
This commit is contained in:
commit
462ed4c3ff
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