[ADD] status_code to LazyResponse constructor

bzr revid: fme@openerp.com-20131204145613-721x3ij2ylpykzgw
This commit is contained in:
Fabien Meghazi
2013-12-04 15:56:13 +01:00
parent 5818b0b2d1
commit cc49b88487
+3 -1
View File
@@ -798,8 +798,10 @@ class LazyResponse(werkzeug.wrappers.Response):
""" Lazy werkzeug response.
API not yet frozen"""
def __init__(self, callback, **kwargs):
def __init__(self, callback, status_code=None, **kwargs):
super(LazyResponse, self).__init__(mimetype='text/html')
if status_code:
self.status_code = status_code
self.callback = callback
self.params = kwargs
def process(self):