mercurial/scmutil.py
changeset 49306 2e726c934fcd
parent 49284 d44e3c45f0e4
child 49450 b57c95a0f5f9
--- a/mercurial/scmutil.py	Tue May 31 21:16:17 2022 +0200
+++ b/mercurial/scmutil.py	Tue May 31 22:50:01 2022 +0200
@@ -1619,9 +1619,8 @@
     def stat(path):
         try:
             return util.cachestat(path)
-        except OSError as e:
-            if e.errno != errno.ENOENT:
-                raise
+        except FileNotFoundError:
+            pass
 
 
 class filecacheentry: