remove errno usage
This commit is contained in:
parent
d3fcd2b329
commit
c4436d6464
1 changed files with 1 additions and 1 deletions
|
|
@ -350,7 +350,7 @@ class Path:
|
|||
OSError: If self.is_dir() is False.
|
||||
"""
|
||||
if not self.is_dir():
|
||||
raise OSError(errno.ENOTDIR, f"Not a directory: {self._path}")
|
||||
raise OSError(f"Not a directory: {self._path}")
|
||||
for name in os.listdir(self._path):
|
||||
yield Path(self._path, name)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue