diff makeitso/template.py @ 75:ec35e5763b52

* fix with assemble function * add a repr to variables
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 07 Jan 2011 18:18:42 -0800
parents d16823fd8c4a
children d4184945f8a8
line wrap: on
line diff
--- a/makeitso/template.py	Fri Jan 07 18:14:21 2011 -0800
+++ b/makeitso/template.py	Fri Jan 07 18:18:42 2011 -0800
@@ -50,6 +50,9 @@
         else:
             return 'Enter %s:' % description
 
+    def __repr__(self):
+        return "Variable(name='%s')" % self.name
+
 def assemble(*args):
     names = set()
     retval = []
@@ -60,6 +63,7 @@
             if variable.name in names:
                 continue
             retval.append(variable.copy())
+            names.add(variable.name)
     return retval
 
 class MakeItSoTemplate(ContentTemplate):