Use bytes and bytearray for Binary

issue4637
This commit is contained in:
resteve 2015-08-12 16:24:08 +02:00
parent 04e79fa3ee
commit 6dd25905a2

View file

@ -178,7 +178,7 @@ class GalateaTutorial(ModelSQL, ModelView):
value = None
try:
with open(filename, 'rb') as file_p:
value = buffer(file_p.read())
value = fields.Binary.cast(file_p.read())
except IOError:
pass
return value