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
8e9f96c12a
commit
0a7f221bd5
@ -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