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
This commit is contained in:
parent
9c4ab6fa7b
commit
36902ed6bd
@ -1,3 +1,7 @@
|
||||
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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user