Remove comments (lines starting with '#') from templates

This commit is contained in:
Will Woods 2011-05-31 11:28:18 -04:00
parent 07695dff71
commit dde2b9ae62

View File

@ -47,6 +47,9 @@ class LoraxTemplate(object):
lines = map(lambda line: line.strip(), lines) lines = map(lambda line: line.strip(), lines)
lines = filter(lambda line: line, lines) lines = filter(lambda line: line, lines)
# remove comments
lines = filter(lambda line: not line.startswith("#"), lines)
# mako template now returns unicode strings # mako template now returns unicode strings
lines = map(lambda line: line.encode("ascii"), lines) lines = map(lambda line: line.encode("ascii"), lines)