aboutsummaryrefslogtreecommitdiff
path: root/contrib/mklog
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2019-05-21 11:37:05 +0300
committerJanne Blomqvist <jb@gcc.gnu.org>2019-05-21 11:37:05 +0300
commit36902ed6bdeafc86e1f9b1778a1138b21580cc93 (patch)
tree328bb824e86cd26fef5db81c4b709e856ccf179b /contrib/mklog
parent9c4ab6fa7b06d1401b1d5354d0e415b9c9b819c3 (diff)
downloadgcc-36902ed6bdeafc86e1f9b1778a1138b21580cc93.zip
gcc-36902ed6bdeafc86e1f9b1778a1138b21580cc93.tar.gz
gcc-36902ed6bdeafc86e1f9b1778a1138b21580cc93.tar.bz2
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 <jb@gcc.gnu.org> * mklog: Open files in text mode. From-SVN: r271459
Diffstat (limited to 'contrib/mklog')
-rwxr-xr-xcontrib/mklog4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/mklog b/contrib/mklog
index 125f52e..be1dc3a 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