]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
patman: Handle non-ascii characters in names
authorChris Packham <judge.packham@gmail.com>
Tue, 7 Feb 2017 07:11:00 +0000 (20:11 +1300)
committerSimon Glass <sjg@chromium.org>
Wed, 8 Feb 2017 13:12:16 +0000 (06:12 -0700)
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>
tools/patman/series.py

index 38a452edad4108e54527e8849cbcb27488031821..c1b86521aa4561f7325fb4ce6724dcd0cb67c9dc 100644 (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