changeset 49310 | 050dc8730858 |
parent 49306 | 2e726c934fcd |
child 50584 | 5586076b8030 |
--- a/mercurial/lock.py Tue May 31 23:45:33 2022 +0200 +++ b/mercurial/lock.py Wed Jun 01 00:47:25 2022 +0200 @@ -38,9 +38,8 @@ if pycompat.sysplatform.startswith(b'linux'): try: result += b'/%x' % os.stat(b'/proc/self/ns/pid').st_ino - except OSError as ex: - if ex.errno not in (errno.ENOENT, errno.EACCES, errno.ENOTDIR): - raise + except (FileNotFoundError, PermissionError, NotADirectoryError): + pass return result