This commit is contained in:
j 2016-01-18 10:53:59 +05:30
commit 0e87b10079
2 changed files with 6 additions and 8 deletions

View file

@ -86,7 +86,6 @@ def shutdown():
os.unlink(state.PID)
def run():
setup.create_db()
PID = sys.argv[2] if len(sys.argv) > 2 else None
if len(sys.argv) > 3 and sys.argv[2] == 'debug':
PID = sys.argv[3]
@ -130,8 +129,8 @@ def run():
(r"(.*)", MainHandler),
]
setup.create_db()
http_server = HTTPServer(Application(handlers, **options))
http_server.listen(settings.server['port'], settings.server['address'])
if PID: