iro.main aufräumen devel
authorSandro Knauß <knauss@netzguerilla.net>
Sun, 11 Mar 2012 16:37:08 +0100
branchdevel
changeset 223 8a7a976a6d58
parent 222 d6d511f2718c
child 224 072de50834f9
iro.main aufräumen
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)