mercurial/ui.py
changeset 49314 2e726c934fcd
parent 49130 7afa96d3b484
child 49888 8147abc05794
--- a/mercurial/ui.py	Tue May 31 21:16:17 2022 +0200
+++ b/mercurial/ui.py	Tue May 31 22:50:01 2022 +0200
@@ -1517,8 +1517,8 @@
                 stderr=procutil.stderr,
                 env=procutil.tonativeenv(procutil.shellenviron(env)),
             )
-        except OSError as e:
-            if e.errno == errno.ENOENT and not shell:
+        except FileNotFoundError:
+            if not shell:
                 self.warn(
                     _(b"missing pager command '%s', skipping pager\n") % command
                 )