Unrud 6 лет назад
Родитель
Сommit
41f8368c7e
4 измененных файлов с 6 добавлено и 7 удалено
  1. 2 2
      radicale.fcgi
  2. 3 2
      radicale.py
  3. 0 2
      radicale.wsgi
  4. 1 1
      setup.py

+ 2 - 2
radicale.fcgi

@@ -13,5 +13,5 @@ WSGI-to-FastCGI mapper.
 from flup.server.fcgi import WSGIServer
 from flup.server.fcgi import WSGIServer
 from radicale import application
 from radicale import application
 
 
-
-WSGIServer(application).run()
+if __name__ == "__main__":
+    WSGIServer(application).run()

+ 3 - 2
radicale.py

@@ -7,6 +7,7 @@ Launch the server according to configuration and command-line options.
 
 
 """
 """
 
 
-import radicale.__main__
+import runpy
 
 
-radicale.__main__.run()
+if __name__ == "__main__":
+    runpy.run_module("radicale", run_name="__main__")

+ 0 - 2
radicale.wsgi

@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 """
 """
 Radicale WSGI file (mod_wsgi and uWSGI compliant).
 Radicale WSGI file (mod_wsgi and uWSGI compliant).
 
 

+ 1 - 1
setup.py

@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
 #!/usr/bin/env python3
-#
+
 # This file is part of Radicale Server - Calendar Server
 # This file is part of Radicale Server - Calendar Server
 # Copyright © 2009-2017 Guillaume Ayoub
 # Copyright © 2009-2017 Guillaume Ayoub
 # Copyright © 2017-2018 Unrud <unrud@outlook.com>
 # Copyright © 2017-2018 Unrud <unrud@outlook.com>