Commit 9595e900 authored by Jérome Perrin's avatar Jérome Perrin

fixup! BusinessTemplate: py3

parent fdf8400c
Pipeline #33951 failed with stage
in 0 seconds
...@@ -351,7 +351,6 @@ class BusinessTemplateArchive(object): ...@@ -351,7 +351,6 @@ class BusinessTemplateArchive(object):
if hasattr(obj, 'read'): if hasattr(obj, 'read'):
obj.seek(0) obj.seek(0)
obj = obj.read() obj = obj.read()
#import pdb; pdb.set_trace()
if not isinstance(obj, bytes): if not isinstance(obj, bytes):
obj = obj.encode('utf-8') obj = obj.encode('utf-8')
self.revision.hash(path, obj) self.revision.hash(path, obj)
...@@ -875,7 +874,7 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -875,7 +874,7 @@ class ObjectTemplateItem(BaseTemplateItem):
f = StringIO() f = StringIO()
exportXML(obj._p_jar, obj._p_oid, f) exportXML(obj._p_jar, obj._p_oid, f)
bta.addObject(f.getvalue().encode(), key, path=path) bta.addObject(str2bytes(f.getvalue()), key, path=path)
if catalog_method_template_item: if catalog_method_template_item:
# add all datas specific to catalog inside one file # add all datas specific to catalog inside one file
......
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