From e6b7c0eb334641181ea4081324f136481626080f Mon Sep 17 00:00:00 2001 From: pictuga Date: Mon, 13 Apr 2020 15:30:09 +0200 Subject: [PATCH] Fix app definition for uwsgi --- main.py | 2 +- morss/morss.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index f4c1fd1..e891255 100644 --- a/main.py +++ b/main.py @@ -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() diff --git a/morss/morss.py b/morss/morss.py index 36df115..7c074e3 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -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]