summaryrefslogtreecommitdiff
path: root/fs/memoryfs.py
diff options
context:
space:
mode:
Diffstat (limited to 'fs/memoryfs.py')
-rw-r--r--fs/memoryfs.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/memoryfs.py b/fs/memoryfs.py
index c9e0e71..38244ad 100644
--- a/fs/memoryfs.py
+++ b/fs/memoryfs.py
@@ -196,6 +196,8 @@ class MemoryFS(FS):
self.dir_entry_factory = DirEntry
self.file_factory = file_factory or MemoryFile
+ if not callable(self.file_factory):
+ raise ValueError("file_factory should be callable")
self.root = self._make_dir_entry('dir', 'root')