Commit 01a80360 authored by Jérome Perrin's avatar Jérome Perrin

Zelenium.zuite._makeFile: open file as binary

fixes errors on python3, File needs bytes
parent 583babf3
......@@ -69,7 +69,9 @@ def _makeFile(filename, prefix=None, id=None):
if id is None:
id = os.path.split( path )[ 1 ]
return File( id=id, title='', file=open(path).read() )
with open(path, 'rb') as f:
data = f.read()
return File( id=id, title='', file=data )
def registerFiles(directory, prefix):
......
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