Surplus_Up (2DU) 6 лет назад
Родитель
Сommit
bb2eb45c69
1 измененных файлов с 7 добавлено и 8 удалено
  1. 7 8
      app.py

+ 7 - 8
app.py

@@ -622,12 +622,11 @@ def main_file(data = None):
 def main_error_404(e):
     return main_error_404_2(conn)
 
-if __name__=="__main__":
-    app.secret_key = rep_key
-    app.wsgi_app = werkzeug.debug.DebuggedApplication(app.wsgi_app, True)
-    app.debug = True
+app.secret_key = rep_key
+app.wsgi_app = werkzeug.debug.DebuggedApplication(app.wsgi_app, True)
+app.debug = True
 
-    http_server = tornado.httpserver.HTTPServer(tornado.wsgi.WSGIContainer(app))
-    http_server.listen(server_set['port'], address = server_set['host'])
-    
-    tornado.ioloop.IOLoop.instance().start()
+http_server = tornado.httpserver.HTTPServer(tornado.wsgi.WSGIContainer(app))
+http_server.listen(server_set['port'], address = server_set['host'])
+
+tornado.ioloop.IOLoop.instance().start()