morss: make cgi_encore more robust

master
pictuga 2020-04-05 16:43:11 +02:00
parent d90756b337
commit 3617f86e9d
1 changed files with 1 additions and 1 deletions

View File

@ -720,7 +720,7 @@ def cgi_error_handler(environ, start_response, app):
@middleware
def cgi_encode(environ, start_response, app):
out = app(environ, start_response)
return [x if isinstance(x, bytes) else x.encode('utf-8') for x in out]
return [x if isinstance(x, bytes) else str(x).encode('utf-8') for x in out]
def cli_app():