Skip to content

Commit ae3017d

Browse files
IOError → OSError (#1385)
Starting from Python 3.3, IOError is an alias of OSError: https://docs.python.org/3/library/exceptions.html#IOError
1 parent edf9b73 commit ae3017d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fsspec/implementations/zip.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ def _open(
113113
path = self._strip_protocol(path)
114114
if "r" in mode and self.mode in set("wa"):
115115
if self.exists(path):
116-
raise IOError("ZipFS can only be open for reading or writing, not both")
116+
raise OSError("ZipFS can only be open for reading or writing, not both")
117117
raise FileNotFoundError(path)
118118
if "r" in self.mode and "w" in mode:
119-
raise IOError("ZipFS can only be open for reading or writing, not both")
119+
raise OSError("ZipFS can only be open for reading or writing, not both")
120120
out = self.zip.open(path, mode.strip("b"))
121121
if "r" in mode:
122122
info = self.info(path)

0 commit comments

Comments
 (0)