comparison makeitso/template.py @ 88:712a6d358083

fixed output broke other things
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 10 Jan 2011 19:57:13 -0800
parents d4184945f8a8
children 26b9c3bba04e
comparison
equal deleted inserted replaced
87:3571417ef92e 88:712a6d358083
149 return missing 149 return missing
150 150
151 def pre(self, variables): 151 def pre(self, variables):
152 """do stuff before interpolation""" 152 """do stuff before interpolation"""
153 153
154 def substitute(self, **variables): 154 def substitute(self, output, **variables):
155 """do the substitution""" 155 """do the substitution"""
156 156
157 vars = self.get_variables(**variables) 157 vars = self.get_variables(**variables)
158 self.pre(vars) 158 self.pre(vars)
159 self.check_missing(vars) 159 self.check_missing(vars)
160 160
161 # do the substitution 161 # do the substitution
162 template = PolyTemplate(self._templates, 162 template = PolyTemplate(self._templates,
163 output=self.output,
164 interactive=self.interactive, 163 interactive=self.interactive,
165 variables=vars) 164 variables=vars)
166 template.substitute() 165 template.check_output(output)
166 template.substitute(output)
167 167
168 self.post(vars) 168 self.post(vars)
169 169
170 def post(self, variables): 170 def post(self, variables):
171 """do stuff after interpolation""" 171 """do stuff after interpolation"""