[Reproducible-commits] [diffoscope] 21/23: Revert "XXX PYTHON3 XXX encode sys.stdout buffer not the stream"

Jérémy Bobbio lunar at moszumanska.debian.org
Sat Sep 19 23:18:22 UTC 2015


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

lunar pushed a commit to branch pu/py3
in repository diffoscope.

commit 5ab41d4c448f33d4df3b04f834028a0086d1ca74
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sun Sep 20 01:04:42 2015 +0200

    Revert "XXX PYTHON3 XXX encode sys.stdout buffer not the stream"
    
    This reverts commit af16ff96aece800aa4fa6b14dd044505d66f0de9.
---
 diffoscope/__main__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/diffoscope/__main__.py b/diffoscope/__main__.py
index 84d0f8f..6971c2f 100644
--- a/diffoscope/__main__.py
+++ b/diffoscope/__main__.py
@@ -82,8 +82,8 @@ def create_parser():
 def make_printer(path):
     if path == '-':
         output = sys.stdout
-        if not sys.stdout.isatty() and hasattr(sys.stdout, 'buffer'):
-            output = codecs.getwriter(sys.stdin.encoding or 'utf-8')(sys.stdout.buffer)
+        if not sys.stdout.isatty():
+            output = codecs.getwriter(sys.stdin.encoding or 'utf-8')(sys.stdout)
     else:
         output = codecs.open(path, 'w', encoding='utf-8')
     def print_func(*args, **kwargs):

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



More information about the Reproducible-commits mailing list