From dde2b9ae629980f425502e56e7bee039bb89769a Mon Sep 17 00:00:00 2001 From: Will Woods Date: Tue, 31 May 2011 11:28:18 -0400 Subject: [PATCH] Remove comments (lines starting with '#') from templates --- src/pylorax/ltmpl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pylorax/ltmpl.py b/src/pylorax/ltmpl.py index 02c3662f..b7196e28 100644 --- a/src/pylorax/ltmpl.py +++ b/src/pylorax/ltmpl.py @@ -47,6 +47,9 @@ class LoraxTemplate(object): lines = map(lambda line: line.strip(), lines) lines = filter(lambda line: line, lines) + # remove comments + lines = filter(lambda line: not line.startswith("#"), lines) + # mako template now returns unicode strings lines = map(lambda line: line.encode("ascii"), lines)