mercurial/dirstatemap.py
changeset 49306 2e726c934fcd
parent 49120 3df46f3a3d6c
child 49469 b5c8524827d2
--- a/mercurial/dirstatemap.py	Tue May 31 21:16:17 2022 +0200
+++ b/mercurial/dirstatemap.py	Tue May 31 22:50:01 2022 +0200
@@ -4,8 +4,6 @@
 # GNU General Public License version 2 or any later version.
 
 
-import errno
-
 from .i18n import _
 
 from . import (
@@ -95,9 +93,7 @@
         try:
             with self._opendirstatefile() as fp:
                 return fp.read(size)
-        except IOError as err:
-            if err.errno != errno.ENOENT:
-                raise
+        except FileNotFoundError:
             # File doesn't exist, so the current state is empty
             return b''