Mercurial > hg > MakeItSo
diff makeitso/makeitso.py @ 112:51c9cb49edec
fix a few minor issues
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 14 Jan 2011 18:36:24 -0800 |
parents | 613e9c19a98c |
children | c3b8ce33d3ad |
line wrap: on
line diff
--- a/makeitso/makeitso.py Fri Jan 14 18:25:36 2011 -0800 +++ b/makeitso/makeitso.py Fri Jan 14 18:36:24 2011 -0800 @@ -180,7 +180,6 @@ def read_variables(self, variables): """read variables from stdin""" - # TODO: variables should (optionally) be richer objects retval = {} for i in variables: print 'Enter %s: ' % i, @@ -341,6 +340,12 @@ # assume the template is an object that conforms to the API self.templates.append(template) + def get_variables(self, **variables): + vars = variables.copy() + for template in self.templates: + vars.update(template.get_variables()) + return vars + def missing(self, **variables): vars = variables.copy() missing = set([])