[Reproducible-commits] [diffoscope] 01/04: Assume UTF-8 output if stdin does not advertise any encoding

Jérémy Bobbio lunar at moszumanska.debian.org
Thu Sep 3 09:40:34 UTC 2015


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

lunar pushed a commit to branch master
in repository diffoscope.

commit 4e0755456a5b017a629f44f601fd5bdf24c1130e
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Thu Sep 3 08:25:48 2015 +0000

    Assume UTF-8 output if stdin does not advertise any encoding
---
 diffoscope/__main__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diffoscope/__main__.py b/diffoscope/__main__.py
index 927e9ad..bccc80c 100644
--- a/diffoscope/__main__.py
+++ b/diffoscope/__main__.py
@@ -80,7 +80,7 @@ def make_printer(path):
     if path == '-':
         output = sys.stdout
         if not sys.stdout.isatty():
-            output = codecs.getwriter(sys.stdin.encoding)(sys.stdout)
+            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