changeset 54:d3e1e5745f24

pass the variables, fixes tests
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 06 Jan 2011 13:14:12 -0800
parents 599c365d9105
children b087a14a664b
files makeitso/makeitso.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/makeitso/makeitso.py	Thu Jan 06 12:29:47 2011 -0800
+++ b/makeitso/makeitso.py	Thu Jan 06 13:14:12 2011 -0800
@@ -172,7 +172,7 @@
 
     def substitute(self, **variables):
         """interactive (for now) substitution"""
-        vars = self.get_variables()
+        vars = self.get_variables(**variables)
         self.check_missing(vars)
         return self._substitute(**vars)
 
@@ -250,7 +250,7 @@
             # find variables from files
             for f in filenames:
                 path = os.path.join(dirpath, f)
-                template = URITemplate(path, self.interactive=self.interactive)
+                template = URITemplate(path, interactive=self.interactive)
                 missed = template.missing(**variables)
                 missing.update(missed)
                 variables.update(dict([(i, '') for i in missed]))
@@ -302,7 +302,7 @@
 
         assert templates, "No templates given!"
 
-        self.interactive = True
+        self.interactive = interactive
         self._templates = templates[:]
         self.templates = []
         self.output = output