[diffoscope] 01/01: Force a flush when writing output to diff. (Closes: #870049)

Ximin Luo infinity0 at debian.org
Mon Jul 31 17:05:36 CEST 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository diffoscope.

commit 0cdafa37bd8cab63991ea18cdf16361d6516d9f3
Author: Ximin Luo <infinity0 at debian.org>
Date:   Mon Jul 31 17:04:03 2017 +0200

    Force a flush when writing output to diff. (Closes: #870049)
---
 diffoscope/feeders.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/diffoscope/feeders.py b/diffoscope/feeders.py
index b285ee6..853fb55 100644
--- a/diffoscope/feeders.py
+++ b/diffoscope/feeders.py
@@ -51,6 +51,9 @@ def from_raw_reader(in_file, filter=lambda buf: buf):
 
             if line_count < max_lines:
                 out_file.write(out)
+                # very long lines can sometimes interact negatively with python
+                # buffering; force a flush here to avoid this, see #870049
+                out_file.flush()
             end_nl = buf[-1] == '\n'
 
         if h is not None and line_count >= max_lines:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list