changeset 2076:8b03da795bd1 gae

Added check for support directory while running moin.py
author Tarashish Mishra <sunu0000@gmail.com>
date Wed, 03 Apr 2013 21:17:23 +0530
parents 1131bb6a958e
children 84d37bbfddfa
files moin.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/moin.py	Mon Apr 01 21:01:52 2013 +0530
+++ b/moin.py	Wed Apr 03 21:17:23 2013 +0530
@@ -15,7 +15,12 @@
     support_path = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'support'))
     if support_path not in sys.path:
         sys.path.insert(0, support_path)
-
+        try:
+            import flask
+            import jinja2
+            import whoosh
+        except ImportError:
+            raise Exception("No support directory found. You need a directory containing all the dependencies to run moin at {0}".format(support_path))
 
 add_support_to_path()