374353580a16

web: do not require flask-lesscss to run in debug mode
[view raw] [browse files]
author Steve Losh <steve@dwaiter.com>
date Tue, 13 Jul 2010 16:41:19 -0400
parents a00c883bebfc
children ac571288381e
branches/tags (none)
files review/web.py

Changes

--- a/review/web.py	Tue Jul 13 01:58:16 2010 -0400
+++ b/review/web.py	Tue Jul 13 16:41:19 2010 -0400
@@ -239,6 +239,9 @@
     app.project_url = None
 
     if app.debug:
-        from flaskext.lesscss import lesscss
-        lesscss(app)
+        try:
+            from flaskext.lesscss import lesscss
+            lesscss(app)
+        except ImportError:
+            ui.warn('Could not find flask-lesscss, not auto-rendering .less files!\n')
     app.run(host=address, port=port)