Commit 1346047c authored by Gabriel Monnerat's avatar Gabriel Monnerat

Create response_dict with key mime to avoid KeyError on the ERP5 side

parent 2e71cb0c
......@@ -250,8 +250,8 @@ class Manager(object):
zip = True
else:
zip = False
response_dict = dict(mime=mimetypes.types_map.get('.%s' % extension))
try:
response_dict = {}
# XXX - use html format instead of xhtml
if orig_format in ("presentation",
"graphics",
......@@ -267,8 +267,6 @@ class Manager(object):
response_dict['mime'] = "application/zip"
elif extension == 'xhtml':
response_dict['mime'] = "text/html"
else:
response_dict['mime'] = mimetypes.types_map.get('.%s' % extension)
return (200, response_dict, "")
except Exception, e:
logger.error(e)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment