remove errno usage

This commit is contained in:
foamyguy 2025-04-29 13:19:32 -05:00
parent d3fcd2b329
commit c4436d6464

View file

@ -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)