mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix start_response to handle exc_info .
This commit is contained in:
parent
b0f1a0fe06
commit
f1466ad78f
@ -114,7 +114,11 @@ class HttpRequest(object):
|
|||||||
|
|
||||||
def start_response(self, status, response_headers, exc_info=None):
|
def start_response(self, status, response_headers, exc_info=None):
|
||||||
if exc_info:
|
if exc_info:
|
||||||
exc_info = None
|
try:
|
||||||
|
if self.start_response_called:
|
||||||
|
raise exc_info[0], exc_info[1], exc_info[2]
|
||||||
|
finally:
|
||||||
|
exc_info = None
|
||||||
elif self.start_response_called:
|
elif self.start_response_called:
|
||||||
raise AssertionError("Response headers already set!")
|
raise AssertionError("Response headers already set!")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user