From 6dd25905a2728db89713be71c9c29d64456d1117 Mon Sep 17 00:00:00 2001 From: resteve Date: Wed, 12 Aug 2015 16:24:08 +0200 Subject: [PATCH] Use bytes and bytearray for Binary issue4637 --- tutorial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial.py b/tutorial.py index 04e2fbb..945434c 100644 --- a/tutorial.py +++ b/tutorial.py @@ -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