From 3e89c102e9a47de1288b268b04a11ff73a22cd2e Mon Sep 17 00:00:00 2001 From: Alban Date: Fri, 16 Nov 2012 15:25:39 +0100 Subject: [PATCH] Fix handling of missing config file --- main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index ac5d285..73f77a3 100755 --- a/main.py +++ b/main.py @@ -1,8 +1,7 @@ # coding: utf-8 -from web import app -import db, config -import os.path +import config +import os.path, sys if __name__ == '__main__': if not config.check(): @@ -12,6 +11,9 @@ if __name__ == '__main__': if not os.path.exists(config.get('CACHE_DIR')): os.makedirs(config.get('CACHE_DIR')) + import db + from web import app + db.init_db() app.run(debug = True)