Message ID | 20170207071100.21495-1-judge.packham@gmail.com |
---|---|
State | Accepted |
Commit | f11a0af713a714ee2efcd810dd81c6dfd59381aa |
Delegated to: | Simon Glass |
Headers | show |
On 7 February 2017 at 00:11, Chris Packham <judge.packham@gmail.com> wrote: > 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> > --- > On Tue, Feb 7, 2017 at 4:32 AM, Simon Glass <sjg@chromium.org> wrote: >> Hi Chris, >> > <snip> >> >> This seems reasonable - can you send this as a patch please? >> >> Regards, >> Simon > > Here you go. I've only been able to test with python 2.7 but I think it > should be fine for python 3.x also. > > tools/patman/series.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Acked-by: Simon Glass <sjg@chromium.org>
On 8 February 2017 at 06:03, Simon Glass <sjg@chromium.org> wrote: > On 7 February 2017 at 00:11, Chris Packham <judge.packham@gmail.com> wrote: >> 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> >> --- >> On Tue, Feb 7, 2017 at 4:32 AM, Simon Glass <sjg@chromium.org> wrote: >>> Hi Chris, >>> >> <snip> >>> >>> This seems reasonable - can you send this as a patch please? >>> >>> Regards, >>> Simon >> >> Here you go. I've only been able to test with python 2.7 but I think it >> should be fine for python 3.x also. >> >> tools/patman/series.py | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) > > Acked-by: Simon Glass <sjg@chromium.org> Applied to u-boot-dm, thanks!
diff --git a/tools/patman/series.py b/tools/patman/series.py index 38a452edad41..c1b86521aa45 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