Commit 24bed864 authored by Jérome Perrin's avatar Jérome Perrin Committed by Arnaud Fontaine

bytes data

parent ad7d0efa
"""
Return true or false based on if document is convertible or not.
"""
MARKER = (None, '',)
MARKER = (None, b'',)
portal = context.getPortalObject()
portal_type = context.getPortalType()
......
......@@ -86,4 +86,4 @@ class Sound(File):
RESPONSE.setHeader('Content-Range',
'bytes %s-%s/%s' % (start, end-1, total_length))
RESPONSE.setStatus(206)
return str(data)
\ No newline at end of file
return bytes(data)
\ No newline at end of file
......@@ -228,7 +228,7 @@ class CachedConvertableMixin:
if isinstance(data, OFSImage):
data = data.data
if isinstance(data, Pdata):
data = str(data)
data = bytes(data)
return mime, data
security.declareProtected(Permissions.AccessContentsInformation, 'getConversionSize')
......
......@@ -39,7 +39,7 @@ class png_to_text(popentransform):
else:
popen = Popen([command, tmpname], env=environment, stdin=PIPE,
stdout=PIPE)
out = popen.communicate(str(data))[0]
out = popen.communicate(bytes(data))[0]
if not self.useStdin:
# remove tmp 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