diff makeitso/template.py @ 159:cfd4f1e91090

wip
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 30 Jul 2013 15:20:38 -0700
parents b2152efec89a
children f10f5beb8ad1
line wrap: on
line diff
--- a/makeitso/template.py	Tue Jul 30 11:08:01 2013 -0700
+++ b/makeitso/template.py	Tue Jul 30 15:20:38 2013 -0700
@@ -16,7 +16,7 @@
 
 class Variable(object):
     """variable object for MakeItSo templates"""
-    
+
     def __init__(self, name, description=None, default=Undefined,
                  cast=None):
         self.name = name
@@ -116,6 +116,8 @@
         # ensure all of these templates exist
         self._templates = []
         for template in self.templates:
+            if not isinstance(template, basestring):
+                template = os.path.join(*template)
             if template.startswith('http://') or template.startswith('https://'):
                 self._templates.append(template)
                 continue
@@ -192,7 +194,7 @@
 
     def post(self, variables, output):
         """do stuff after interpolation"""
-        
+
     def read_variables(self, variables):
         """read variables from stdin"""
         retval = {}