diff mbox series

[05/14] backport: convert tree section names to ascii

Message ID 20180920112842.27198-6-luca@coelho.fi (mailing list archive)
State Accepted
Headers show
Series backport: updates for 4.19 | expand

Commit Message

Luca Coelho Sept. 20, 2018, 11:28 a.m. UTC
From: Luca Coelho <luciano.coelho@intel.com>

For some reason, sometimes when the git logs contain non-ascii
characters, we get some conversion errors.  This only happens if one
of the strings we use is explicitly unicode, otherwise everything is
fine.  The only string we use that is of unicode type is the tree
names that comes from the configuration sections.  To avoid issues,
convert the strings we get from the config file into ascii before
using it.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 devel/git-tracker.py | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/devel/git-tracker.py b/devel/git-tracker.py
index 1789ad975154..d51f59ba6507 100755
--- a/devel/git-tracker.py
+++ b/devel/git-tracker.py
@@ -190,6 +190,8 @@  if __name__ == '__main__':
         backport_rev = git.rev_parse(tree=source_dir)
 
         for tree in trees:
+            # make sure tree is ascii to prevent conversion problems
+            tree = str(tree)
             input = config.get(tree, 'input')
             output = config.get(tree, 'output')
             defconfig = None