patman: Handle non-ascii characters in names

When gathering addresses for the Cc list patman would encounter a
UnicodeDecodeError due to non-ascii characters in the author name.
Address this by explicitly using utf-8 when building the Cc list.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Chris Packham 2017-02-07 20:11:00 +13:00 committed by Simon Glass
parent 8d7523c55c
commit f11a0af713

View File

@ -235,7 +235,8 @@ class Series(dict):
if cover_fname:
cover_cc = gitutil.BuildEmailList(self.get('cover_cc', ''))
print(cover_fname, ', '.join(set(cover_cc + all_ccs)), file=fd)
cc_list = ', '.join([x.decode('utf-8') for x in set(cover_cc + all_ccs)])
print(cover_fname, cc_list.encode('utf-8'), file=fd)
fd.close()
return fname