[U-Boot] [PATCH] RFC: patman: Adjust handling of unicode email address

Simon Glass sjg at chromium.org
Sun Apr 23 23:10:18 UTC 2017


This is a test patch for Philipp.

Please apply this on top of your existing patch:

http://patchwork.ozlabs.org/patch/752268/

For me this handles this better in that I can deal with get_maintainers
returning unicode. Can you check if it breaks anything on your side. If
so, please let me know what.

Ideally we should have some tests in patman for this stuff.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 tools/patman/series.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/patman/series.py b/tools/patman/series.py
index 134a381ae3..acdd27fc2c 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -119,7 +119,7 @@ class Series(dict):
                     email = col.Color(col.YELLOW, "<alias '%s' not found>"
                             % tag)
                 if email:
-                    print('      Cc: ', email.encode('utf-8'))
+                    print('      Cc: ', email)
         print
         for item in to_set:
             print('To:\t ', item)
@@ -228,9 +228,10 @@ class Series(dict):
             list += gitutil.BuildEmailList(commit.cc_list,
                                            raise_on_error=raise_on_error)
             if add_maintainers:
-                list += get_maintainer.GetMaintainer(commit.patch)
+                main = get_maintainer.GetMaintainer(commit.patch)
+                list += [x.encode('utf-8') for x in main]
             all_ccs += list
-            print(commit.patch, ', '.join(set(list)).encode('utf-8'), file=fd)
+            print(commit.patch, ', '.join(set(list)), file=fd)
             self._generated_cc[commit.patch] = list
 
         if cover_fname:
-- 
2.12.2.816.g2cccc81164-goog



More information about the U-Boot mailing list