Browse Source

Fix app definition for uwsgi

master
pictuga 2 months ago
parent
commit
e6b7c0eb33
2 changed files with 4 additions and 1 deletions
  1. +1
    -1
      main.py
  2. +3
    -0
      morss/morss.py

+ 1
- 1
main.py View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python

from morss import main, cgi_wrapper as application
from morss import main, cgi_standalone_app as application

if __name__ == '__main__':
main()

+ 3
- 0
morss/morss.py View File

@@ -719,6 +719,9 @@ def cgi_encode(environ, start_response, app):
return [x if isinstance(x, bytes) else str(x).encode('utf-8') for x in out]


cgi_standalone_app = cgi_encode(cgi_error_handler(cgi_dispatcher(cgi_file_handler(cgi_app))))


def cli_app():
options = Options(filterOptions(parseOptions(sys.argv[1:-1])))
url = sys.argv[-1]


Loading…
Cancel
Save