Commit b8d7a856 authored by Godefroid Chapelle's avatar Godefroid Chapelle Committed by Jim Fulton

Backport from 4.0 and later (#162)

parent 1f0bd704
......@@ -68,7 +68,8 @@ class Blob(persistent.Persistent):
raise TypeError('Blobs do not support subclassing.')
self.__setstate__()
if data is not None:
self.open('w').write(data)
with self.open('w') as f:
f.write(data)
def __setstate__(self, state=None):
# we use lists here because it will allow us to add and remove
......
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