Commit 38ab08b1 by rfkelly0

dont raise ResourceNotFoundError in isdir()/isfile(), they should return False

parent 992d3c41
...@@ -66,8 +66,7 @@ class MountFS(FS): ...@@ -66,8 +66,7 @@ class MountFS(FS):
def isdir(self, path): def isdir(self, path):
fs, mount_path, delegate_path = self._delegate(path) fs, mount_path, delegate_path = self._delegate(path)
if fs is None: if fs is None:
raise ResourceNotFoundError(path) return False
if fs is self: if fs is self:
object = self.mount_tree.get(path, None) object = self.mount_tree.get(path, None)
return isinstance(object, dict) return isinstance(object, dict)
...@@ -78,8 +77,7 @@ class MountFS(FS): ...@@ -78,8 +77,7 @@ class MountFS(FS):
def isfile(self, path): def isfile(self, path):
fs, mount_path, delegate_path = self._delegate(path) fs, mount_path, delegate_path = self._delegate(path)
if fs is None: if fs is None:
return ResourceNotFoundError(path) return False
if fs is self: if fs is self:
object = self.mount_tree.get(path, None) object = self.mount_tree.get(path, None)
return type(object) is MountFS.FileMount return type(object) is MountFS.FileMount
......
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