Commit 65047be5 authored by Fabien Devaux's avatar Fabien Devaux

Corrected a cStringIO related bug.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6500 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3a3c4e58
...@@ -69,11 +69,13 @@ class OOoBuilder: ...@@ -69,11 +69,13 @@ class OOoBuilder:
security.declarePrivate('__init__') security.declarePrivate('__init__')
def __init__(self, document): def __init__(self, document):
if hasattr(document, 'data') : if hasattr(document, 'data') :
self._document = StringIO(document.data) self._document = StringIO()
self._document.write(document.data)
elif hasattr(document, 'read') : elif hasattr(document, 'read') :
self._document = document self._document = document
else : else :
self._document = StringIO(document) self._document = StringIO()
self._document.write(document)
self._image_count = 0 self._image_count = 0
self._manifest_additions_list = [] self._manifest_additions_list = []
......
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