hgext/git/dirstate.py
changeset 49314 2e726c934fcd
parent 49133 020328be00cb
child 49381 3c4d36a96a3e
--- a/hgext/git/dirstate.py	Tue May 31 21:16:17 2022 +0200
+++ b/hgext/git/dirstate.py	Tue May 31 22:50:01 2022 +0200
@@ -1,5 +1,4 @@
 import contextlib
-import errno
 import os
 
 from mercurial.node import sha1nodeconstants
@@ -318,9 +317,7 @@
             # TODO construct the stat info from the status object?
             try:
                 s = os.stat(os.path.join(cwd, path))
-            except OSError as e:
-                if e.errno != errno.ENOENT:
-                    raise
+            except FileNotFoundError:
                 continue
             r[path] = s
         return r