mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 02:46:52 +00:00
Flush all subprocess output before exit
Subprocesses write to stdout. They must flush their output before the main process exits to avoid losing output or confusing the calling program.
This commit is contained in:
parent
26f909b282
commit
6e08711622
1 changed files with 3 additions and 0 deletions
|
|
@ -74,6 +74,9 @@ class BaseQReport(pep8.BaseReport):
|
|||
except KeyboardInterrupt:
|
||||
pass
|
||||
finally:
|
||||
# ensure all output is flushed before main process continues
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
self.result_queue.put(self.get_state())
|
||||
|
||||
def get_state(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue