Commit 78984c22 by willmcgugan

Potential fix for issue opening memory files

parent c30cbe13
...@@ -36,6 +36,7 @@ class MemoryFile(object): ...@@ -36,6 +36,7 @@ class MemoryFile(object):
self.path = path self.path = path
self.memory_fs = memory_fs self.memory_fs = memory_fs
self.mode = mode self.mode = mode
value = value or ''
self.mem_file = None self.mem_file = None
...@@ -64,7 +65,7 @@ class MemoryFile(object): ...@@ -64,7 +65,7 @@ class MemoryFile(object):
self.mem_file.write(value) self.mem_file.write(value)
else: else:
if value is not None: if value:
self.mem_file = StringIO(value) self.mem_file = StringIO(value)
else: else:
self.mem_file = StringIO() self.mem_file = StringIO()
......
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