From: Chris Packham Date: Tue, 7 Feb 2017 07:11:00 +0000 (+1300) Subject: patman: Handle non-ascii characters in names X-Git-Tag: v2017.03-rc2~15^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f11a0af713a714ee2efcd810dd81c6dfd59381aa;p=oweals%2Fu-boot.git 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 --- 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