simplify the code

This commit is contained in:
benoitc 2012-03-16 18:43:35 +01:00
parent d6012fa84b
commit 961eabb332
2 changed files with 2 additions and 3 deletions

View File

@ -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])

View File

@ -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,