diff makeitso/makeitso.py @ 37:7cee2869bd7b

stub out directory example
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 01 Jan 2011 22:28:35 -0800
parents 0cba953a03ca
children 9739212a63c3
line wrap: on
line diff
--- a/makeitso/makeitso.py	Sat Jan 01 22:13:33 2011 -0800
+++ b/makeitso/makeitso.py	Sat Jan 01 22:28:35 2011 -0800
@@ -195,12 +195,15 @@
     def substitute(self, **variables):
         output = ContentTemplate.substitute(self, **variables)
         f = self.output
+        
         if isinstance(f, basestring):
             if os.path.isdir(f):
                 f = os.path.join(f, basename(self.name))
             f = file(f, 'w')
-        print >> f, output
-            
+            print >> f, output
+            f.close()
+        else:
+            print >> f, output
 
 class DirectoryTemplate(ContentTemplate):
     """template for a directory structure"""