# HG changeset patch # User Pierre-Yves David # Date 2023-08-30 12:22:55 # Node ID 29ce50726ce00a40b4668870c883964cda75f95e # Parent 6ca86508047975f18d5b1ded9f648ef1ebce643f ui: use sysstr to check for attribute presence We do not need bytes here. diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -1467,7 +1467,7 @@ class ui: 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 @@ class ui: @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())