morss: improved output type
parent
2ccf36617a
commit
e72ca3f984
|
@ -532,7 +532,7 @@ def cgi_app(environ, start_response):
|
||||||
|
|
||||||
if options.html or options.reader:
|
if options.html or options.reader:
|
||||||
headers['content-type'] = 'text/html'
|
headers['content-type'] = 'text/html'
|
||||||
elif options.txt:
|
elif options.txt or options.silent:
|
||||||
headers['content-type'] = 'text/plain'
|
headers['content-type'] = 'text/plain'
|
||||||
elif options.json:
|
elif options.json:
|
||||||
headers['content-type'] = 'application/json'
|
headers['content-type'] = 'application/json'
|
||||||
|
@ -601,7 +601,7 @@ def cgi_wrapper(environ, start_response):
|
||||||
|
|
||||||
# actual morss use
|
# actual morss use
|
||||||
try:
|
try:
|
||||||
return [cgi_app(environ, start_response)] or []
|
return [cgi_app(environ, start_response) or '(empty)']
|
||||||
except (KeyboardInterrupt, SystemExit):
|
except (KeyboardInterrupt, SystemExit):
|
||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in New Issue