changeset 50898:29ce50726ce0

ui: use sysstr to check for attribute presence We do not need bytes here.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 30 Aug 2023 14:22:55 +0200
parents 6ca865080479
children d28cc52e2c0f
files mercurial/ui.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Wed Aug 30 14:07:02 2023 +0200
+++ b/mercurial/ui.py	Wed Aug 30 14:22:55 2023 +0200
@@ -1467,7 +1467,7 @@
         self.flush()
 
         wasformatted = self.formatted()
-        if util.safehasattr(signal, b"SIGPIPE"):
+        if util.safehasattr(signal, "SIGPIPE"):
             signal.signal(signal.SIGPIPE, _catchterm)
         if self._runpager(pagercmd, pagerenv):
             self.pageractive = True
@@ -1547,7 +1547,7 @@
 
         @self.atexit
         def killpager():
-            if util.safehasattr(signal, b"SIGINT"):
+            if util.safehasattr(signal, "SIGINT"):
                 signal.signal(signal.SIGINT, signal.SIG_IGN)
             # restore original fds, closing pager.stdin copies in the process
             os.dup2(stdoutfd, procutil.stdout.fileno())