Due to the python 3 conversion, files should be opened in text mode,
matching stdin/stdout.
2019-05-21 Janne Blomqvist <jb@gcc.gnu.org>
* mklog: Open files in text mode.
From-SVN: r271459
+2019-05-21 Janne Blomqvist <jb@gcc.gnu.org>
+
+ * mklog: Open files in text mode.
+
2019-05-21 Janne Blomqvist <jb@gcc.gnu.org>
* mklog: Convert to Python 3.
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")
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