From e72ca3f984510b59b45004c209a68182c0c74848 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 30 Sep 2018 22:02:29 +0200 Subject: [PATCH] morss: improved output type --- morss/morss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/morss/morss.py b/morss/morss.py index 7d92156..8d4274b 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -532,7 +532,7 @@ def cgi_app(environ, start_response): if options.html or options.reader: headers['content-type'] = 'text/html' - elif options.txt: + elif options.txt or options.silent: headers['content-type'] = 'text/plain' elif options.json: headers['content-type'] = 'application/json' @@ -601,7 +601,7 @@ def cgi_wrapper(environ, start_response): # actual morss use try: - return [cgi_app(environ, start_response)] or [] + return [cgi_app(environ, start_response) or '(empty)'] except (KeyboardInterrupt, SystemExit): raise except Exception as e: