Commits

georg.brandl  committed ab83ceb

Fix setup.py when babel is unavailable.

  • Participants
  • Parent commits a895655

Comments (0)

Files changed (1)

 # Provide a "compile_catalog" command that also creates the translated
 # JavaScript files if Babel is available.
 
-cmdclass = {}
-
 try:
     from babel.messages.pofile import read_po
     from babel.messages.frontend import compile_catalog
     except ImportError:
         from json import dump
 except ImportError:
-    class compile_catalog_plusjs(compile_catalog):
-        def run(self):
-            compile_catalog.run(self)
-            log.warn('simplejson/json or babel is not available; not writing '
-                     'JavaScript translation files.')
+    pass
 else:
     class compile_catalog_plusjs(compile_catalog):
         """
                 finally:
                     outfile.close()
 
-cmdclass['compile_catalog'] = compile_catalog_plusjs
+    cmdclass['compile_catalog'] = compile_catalog_plusjs
 
 
 setup(