From 36902ed6bdeafc86e1f9b1778a1138b21580cc93 Mon Sep 17 00:00:00 2001 From: Janne Blomqvist Date: Tue, 21 May 2019 11:37:05 +0300 Subject: [PATCH] contrib/mklog: Open files in text mode Due to the python 3 conversion, files should be opened in text mode, matching stdin/stdout. 2019-05-21 Janne Blomqvist * mklog: Open files in text mode. From-SVN: r271459 --- contrib/ChangeLog | 4 ++++ contrib/mklog | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 2b6425b9ec2..455d3f80146 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2019-05-21 Janne Blomqvist + + * mklog: Open files in text mode. + 2019-05-21 Janne Blomqvist * mklog: Convert to Python 3. diff --git a/contrib/mklog b/contrib/mklog index 125f52ef11c..be1dc3a27fc 100755 --- a/contrib/mklog +++ b/contrib/mklog @@ -380,7 +380,7 @@ def main(): if len(args) == 1 and args[0] == '-': input = sys.stdin elif len(args) == 1: - input = open(args[0], 'rb') + input = open(args[0]) else: error("too many arguments; for more details run with -h") @@ -442,7 +442,7 @@ def main(): shutil.copymode(args[0], tmp) # Open the temp file, clearing contents. - out = open(tmp, 'wb') + out = open(tmp, 'w') else: tmp = None out = sys.stdout -- 2.30.2