diff makeitso/makeitso.py @ 138:169e02e190ef

peg to tempita version and eliminate cruft
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 21 Feb 2012 21:01:28 -0800
parents 0107f95376b3
children cfd4f1e91090
line wrap: on
line diff
--- a/makeitso/makeitso.py	Tue Feb 21 20:20:21 2012 -0800
+++ b/makeitso/makeitso.py	Tue Feb 21 21:01:28 2012 -0800
@@ -17,7 +17,6 @@
 from ConfigParser import RawConfigParser
 from optparse import OptionParser
 
-
 # URL of -this file-
 location = 'http://k0s.org/mozilla/hg/MakeItSo/raw-file/tip/makeitso/makeitso.py'
 
@@ -65,9 +64,6 @@
         cleanup()
         raise NotImplementedError('This should say something like youre not connected to the net')
 
-# does tempita support delimeters?
-has_delimeters = 'delimeters' in inspect.getargspec(tempita.Template.__init__).args
-
 # regular expressions for finding the shebang
 shebang_re = '#!.*makeitso.*'
 shebang_re = re.compile(shebang_re)
@@ -76,7 +72,7 @@
 
 def parent_uri(uri):
     """parent resource of a URI"""
-    
+
     if '://' in uri:
         return uri.rsplit('/', 1)[0] + '/'
     else:
@@ -378,7 +374,7 @@
         # do the substitution
         for template in self.templates:
             template.substitute(vars, output)
-        
+
 ### command line interface
 
 def read_config(config_files, templates=()):
@@ -390,7 +386,6 @@
     for template in templates:
         if template in parser.sections():
             retval.update(dict(parser.items(template)))
-    
     return retval
 
 def invocation(url, **variables):
@@ -411,13 +406,10 @@
         if not (os.path.exists(dotfile) and os.path.isfile(dotfile)):
             dotfile = None
 
-    # delimeters
-    # XXX needs tempita trunk
-    if has_delimeters:
-        parser.add_option('-[', '--start-braces', dest='start_braces',
-                          help='starting delimeter')
-        parser.add_option('-]', '--end-braces', dest='end_braces',
-                          help='starting delimeter')
+    parser.add_option('-[', '--start-braces', dest='start_braces',
+                      help='starting delimeter')
+    parser.add_option('-]', '--end-braces', dest='end_braces',
+                      help='starting delimeter')
 
     # options about where to put things
     parser.add_option('-o', '--output', dest='output',
@@ -454,7 +446,6 @@
                           action='store_true', default=False,
                           help="list installed MakeItSo! templates")
 
-    
     options, args = parser.parse_args(args)
 
     # list the templates
@@ -527,7 +518,7 @@
 
     # cleanup
     cleanup()
-        
+
 if __name__ == '__main__':
     main()