Mako template returns unicode strings (#681003)
New mako template returns unicode strings, which are a problem for shlex. We need to encode them to ascii.
This commit is contained in:
parent
866b36115a
commit
600e9c16e8
@ -50,6 +50,9 @@ class LoraxTemplate(object):
|
||||
lines = map(lambda line: line.strip(), lines)
|
||||
lines = filter(lambda line: line, lines)
|
||||
|
||||
# mako template now returns unicode strings
|
||||
lines = map(lambda line: line.encode("ascii"), lines)
|
||||
|
||||
# split with shlex
|
||||
lines = map(shlex.split, lines)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user