Commit 1d932357 authored by Jérome Perrin's avatar Jérome Perrin

bt: fix export 2files

parent 41d660e9
...@@ -795,7 +795,10 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -795,7 +795,10 @@ class ObjectTemplateItem(BaseTemplateItem):
return mime.extensions[0] return mime.extensions[0]
for ext in mime.globs: for ext in mime.globs:
if ext[0] == "*" and ext.count(".") == 1: if ext[0] == "*" and ext.count(".") == 1:
return ext[2:].encode("utf-8") ext = ext[2:]
if six.PY2:
return ext.encode("utf-8")
return ext
# in case we could not read binary flag from mimetypes_registry then return # in case we could not read binary flag from mimetypes_registry then return
# '.bin' for all the Portal Types where exported_property_type is data # '.bin' for all the Portal Types where exported_property_type is data
......
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