From f11a0af713a714ee2efcd810dd81c6dfd59381aa Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Tue, 7 Feb 2017 20:11:00 +1300 Subject: [PATCH] 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 Acked-by: Simon Glass --- tools/patman/series.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/patman/series.py b/tools/patman/series.py index 38a452edad..c1b86521aa 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -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 -- 2.25.1