Commit d4a910f9 by willmcgugan

Fixed writecontents for files that don't have a flush method

parent 09b34494
...@@ -570,6 +570,7 @@ class FS(object): ...@@ -570,6 +570,7 @@ class FS(object):
chunk = data.read(1024*512) chunk = data.read(1024*512)
else: else:
f.write(data) f.write(data)
if hasattr(f, 'flush'):
f.flush() f.flush()
finally: finally:
if f is not None: if f is not None:
......
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