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:
Martin Gracik 2011-03-10 10:53:55 +01:00
parent 866b36115a
commit 600e9c16e8

View File

@ -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)