[ADD] support for zipped reports (code=zlib/reportgz config key) in report downloader
bzr revid: xmo@openerp.com-20110907072818-9ondrxh0q2j0yo7d
This commit is contained in:
parent
0b17356d23
commit
2a3cb44782
|
@ -11,6 +11,7 @@ import simplejson
|
|||
import textwrap
|
||||
import xmlrpclib
|
||||
import time
|
||||
import zlib
|
||||
import webrelease
|
||||
from xml.etree import ElementTree
|
||||
from cStringIO import StringIO
|
||||
|
@ -1357,6 +1358,8 @@ class Reports(View):
|
|||
time.sleep(self.POLLING_DELAY)
|
||||
|
||||
report = base64.b64decode(report_struct['result'])
|
||||
if report_struct.get('code') == 'zlib':
|
||||
report = zlib.decompress(report)
|
||||
report_mimetype = self.TYPES_MAPPING.get(
|
||||
report_struct['format'], 'octet-stream')
|
||||
return req.make_response(report,
|
||||
|
|
Loading…
Reference in New Issue