mercurial/txnutil.py
changeset 49306 2e726c934fcd
parent 48875 6000f5b25c9b
--- a/mercurial/txnutil.py	Tue May 31 21:16:17 2022 +0200
+++ b/mercurial/txnutil.py	Tue May 31 22:50:01 2022 +0200
@@ -6,8 +6,6 @@
 # GNU General Public License version 2 or any later version.
 
 
-import errno
-
 from . import encoding
 
 
@@ -29,7 +27,6 @@
     if mayhavepending(root):
         try:
             return (vfs(b'%s.pending' % filename, **kwargs), True)
-        except IOError as inst:
-            if inst.errno != errno.ENOENT:
-                raise
+        except FileNotFoundError:
+            pass
     return (vfs(filename, **kwargs), False)