diff makeitso/makeitso.py @ 63:b91133e3b02d

override get_variables for API template; could instead do this in the ctor, alternately
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 06 Jan 2011 17:58:34 -0800
parents 728cae02a6ed
children 7909dfaef33b
line wrap: on
line diff
--- a/makeitso/makeitso.py	Thu Jan 06 17:49:40 2011 -0800
+++ b/makeitso/makeitso.py	Thu Jan 06 17:58:34 2011 -0800
@@ -134,6 +134,12 @@
         
         tempita.Template.__init__(self, content, name=name)
 
+    def get_variables(self, **variables):
+        """the template's augmented variable set"""
+        vars = self.defaults.copy()
+        vars.update(variables)
+        return vars
+
     def missing(self, **variables):
         """return additional variables needed"""
         vars = self.get_variables(**variables)
@@ -148,11 +154,6 @@
                 vars[missed] = ''
         return missing
 
-    def get_variables(self, **variables):
-        vars = self.defaults.copy()
-        vars.update(variables)
-        return vars
-
     def check_missing(self, vars):
         """
         check for missing variables and, if applicable,