Commits

Ronny Pfannschmidt committed 6d0bd12

quick resuffle

  • Participants
  • Parent commits ec97ac4

Comments (0)

Files changed (1)

File couchdb_compose/preprocess.py

 
 DOT_COFFEE = '.coffee'
 
+
 def commonjs_to_coffeescript(path, name, data):
     if isinstance(data, str) and name.endswith(DOT_COFFEE):
         try:
             raise SyntaxError(exc.args[0])
         return name[:-len(DOT_COFFEE)], data.strip()
 
-preprocessors = [commonjs_to_coffeescript]
 
 
 def preprocess(data, path, processors):
-    for k, v in data.items():
+    for k, v in list(data.items()):
         for p in processors:
             try:
                 result = p(path, k, v)
                 preprocess(v, path + (k,), processors)
 
 
+preprocessors = [commonjs_to_coffeescript]
+
 def run_preprocessors(composer):
     preprocess(composer.doc, (), preprocessors)