# HG changeset patch # User Sandro Knauß # Date 1331480228 -3600 # Node ID 8a7a976a6d585050c909decd03fb71e72547024a # Parent d6d511f2718ccd115d329d00961b40abbf62f602 iro.main aufräumen diff -r d6d511f2718c -r 8a7a976a6d58 iro/main.py --- a/iro/main.py Sat Mar 10 19:03:32 2012 +0100 +++ b/iro/main.py Sun Mar 11 16:37:08 2012 +0100 @@ -1,17 +1,13 @@ from twisted.web import resource, server from twisted.internet import reactor from twisted.python import log -import sys from sqlalchemy import create_engine, pool -import logging - from .model import setEngine, setPool from .controller.pool import startPool, dbPool from .view import xmlrpc from . import config -from .install import check, createSampleConfig def runReactor(reactor, engine, port, root): setEngine(engine) @@ -19,16 +15,12 @@ setPool(dbPool) reactor.listenTCP(port, server.Site(root)) - logging.info("Server is running now...") + log.msg("Server is running now...") reactor.run() 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, @@ -40,7 +32,6 @@ v2 = resource.Resource() v2 = xmlrpc.appendResource(root) - root.addChild('2.0', v2) + root.putChild('2.0', v2) - runReactor(reactor, engine, config.main.port, root)