hgext/narrow/narrowcommands.py
changeset 52640 24ee91ba9aa8
parent 51859 f4733654f144
--- a/hgext/narrow/narrowcommands.py	Mon Jan 06 14:15:40 2025 -0500
+++ b/hgext/narrow/narrowcommands.py	Sun Jan 05 21:03:17 2025 -0500
@@ -97,7 +97,7 @@
         ui.status(_(b"reading narrowspec from '%s'\n") % filepath)
         try:
             fdata = util.readfile(filepath)
-        except IOError as inst:
+        except OSError as inst:
             raise error.Abort(
                 _(b"cannot read narrowspecs from '%s': %s")
                 % (filepath, encoding.strtolocal(inst.strerror))
@@ -532,7 +532,7 @@
         filepath = os.path.join(encoding.getcwd(), newrules)
         try:
             fdata = util.readfile(filepath)
-        except IOError as inst:
+        except OSError as inst:
             raise error.StorageError(
                 _(b"cannot read narrowspecs from '%s': %s")
                 % (filepath, encoding.strtolocal(inst.strerror))