Commit d9a41f69 by rfkelly0

S3FS.open: raise ResourceInvalidError if called on a dir

parent 1d9bd34e
...@@ -204,6 +204,8 @@ class S3FS(FS): ...@@ -204,6 +204,8 @@ class S3FS(FS):
so that it can be worked on efficiently. Any changes made to the so that it can be worked on efficiently. Any changes made to the
file are only sent back to S3 when the file is flushed or closed. file are only sent back to S3 when the file is flushed or closed.
""" """
if self.isdir(path):
raise ResourceInvalidError(path)
s3path = self._s3path(path) s3path = self._s3path(path)
# Truncate the file if requested # Truncate the file if requested
if "w" in mode: if "w" in mode:
......
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