# HG changeset patch # User Jeff Hammel # Date 1295058984 28800 # Node ID 51c9cb49edecfe1c13afc27f3540c957f7d94ffa # Parent bad70fb08b1580018aa0d7d17e72d2d24bf17eba fix a few minor issues diff -r bad70fb08b15 -r 51c9cb49edec makeitso/makeitso.py --- 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([]) diff -r bad70fb08b15 -r 51c9cb49edec makeitso/template.py --- a/makeitso/template.py Fri Jan 14 18:25:36 2011 -0800 +++ b/makeitso/template.py Fri Jan 14 18:36:24 2011 -0800 @@ -154,7 +154,7 @@ if self.look: # scan templates for other variables template = PolyTemplate(self._templates, - interactive=self.interactive, + interactive=False, variables=vars) missing.update(template.missing())