mercurial/merge.py
changeset 49306 2e726c934fcd
parent 48946 642e31cb55f0
child 49365 79b2c98ab7b4
--- a/mercurial/merge.py	Tue May 31 21:16:17 2022 +0200
+++ b/mercurial/merge.py	Tue May 31 22:50:01 2022 +0200
@@ -7,7 +7,6 @@
 
 
 import collections
-import errno
 import struct
 
 from .i18n import _
@@ -1306,10 +1305,8 @@
 def _getcwd():
     try:
         return encoding.getcwd()
-    except OSError as err:
-        if err.errno == errno.ENOENT:
-            return None
-        raise
+    except FileNotFoundError:
+        return None
 
 
 def batchremove(repo, wctx, actions):