changeset 49310 | 050dc8730858 |
parent 49307 | 6f2a57ba2d13 |
child 49810 | a9faacdc5943 |
--- a/mercurial/posix.py Tue May 31 23:45:33 2022 +0200 +++ b/mercurial/posix.py Wed Jun 01 00:47:25 2022 +0200 @@ -581,9 +581,7 @@ st = lstat(nf) if getkind(st.st_mode) not in _wantedkinds: st = None - except OSError as err: - if err.errno not in (errno.ENOENT, errno.ENOTDIR): - raise + except (FileNotFoundError, NotADirectoryError): st = None yield st