diff -r c8615310da30 -r d6d511f2718c iro/main.py --- a/iro/main.py Sat Mar 10 19:03:02 2012 +0100 +++ b/iro/main.py Sat Mar 10 19:03:32 2012 +0100 @@ -1,5 +1,7 @@ from twisted.web import resource, server from twisted.internet import reactor +from twisted.python import log +import sys from sqlalchemy import create_engine, pool @@ -8,7 +10,8 @@ from .model import setEngine, setPool from .controller.pool import startPool, dbPool from .view import xmlrpc -import config +from . import config +from .install import check, createSampleConfig def runReactor(reactor, engine, port, root): setEngine(engine) @@ -21,7 +24,11 @@ if __name__ == '__main__': - + + if not check(): + createSampleConfig() + log.msg("Please edit iro.conf and run %s --install"%sys.argv[0]) + config.readConfig() engine = create_engine(config.main.dburl,