mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
simplify the code
This commit is contained in:
parent
d6012fa84b
commit
961eabb332
@ -21,5 +21,6 @@ def app(environ, start_response):
|
||||
('Content-Length', str(len(data))),
|
||||
('X-Gunicorn-Version', __version__)
|
||||
]
|
||||
|
||||
start_response(status, response_headers)
|
||||
return iter([data])
|
||||
|
||||
@ -107,9 +107,7 @@ class Logger(object):
|
||||
if cfg.errorlog != "-":
|
||||
# if an error log file is set redirect stdout & stderr to
|
||||
# this log file.
|
||||
stdout_log = LazyWriter(cfg.errorlog, 'a')
|
||||
sys.stdout = stdout_log
|
||||
sys.stderr = stdout_log
|
||||
sys.stdout = sys.stderr = LazyWriter(cfg.errorlog, 'a')
|
||||
|
||||
# set gunicorn.error handler
|
||||
self._set_handler(self.error_log, cfg.errorlog,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user