mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
patman: Use unicode for file I/O
At present patman test fail in some environments which don't use utf-8 as the default file encoding. Add this explicitly. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -511,8 +511,8 @@ def FixPatch(backup_dir, fname, series, commit):
|
||||
A list of errors, or [] if all ok.
|
||||
"""
|
||||
handle, tmpname = tempfile.mkstemp()
|
||||
outfd = os.fdopen(handle, 'w')
|
||||
infd = open(fname, 'r')
|
||||
outfd = os.fdopen(handle, 'w', encoding='utf-8')
|
||||
infd = open(fname, 'r', encoding='utf-8')
|
||||
ps = PatchStream(series)
|
||||
ps.commit = commit
|
||||
ps.ProcessStream(infd, outfd)
|
||||
|
Reference in New Issue
Block a user