@@ -107,7 +107,7 @@ elif options.test:
# Called from git with a patch filename as argument
# Printout a list of additional CC recipients for this patch
elif options.cc_cmd:
- fd = open(options.cc_cmd, 'r')
+ fd = open(options.cc_cmd, 'r', encoding='utf-8')
re_line = re.compile('(\S*) (.*)')
for line in fd.readlines():
match = re_line.match(line)
@@ -251,7 +251,7 @@ class Series(dict):
cover_cc = [tools.FromUnicode(m) for m in cover_cc]
cc_list = '\0'.join([tools.ToUnicode(x)
for x in sorted(set(cover_cc + all_ccs))])
- print(cover_fname, cc_list.encode('utf-8'), file=fd)
+ print(cover_fname, cc_list, file=fd)
fd.close()
return fname
The Python 3 conversion doesn't work correctly with the new patch to use NUL as the separator in the CC file. Fix this by avoiding encoding the CC list written to the file. Signed-off-by: Simon Glass <sjg@chromium.org> --- tools/patman/patman.py | 2 +- tools/patman/series.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)