# HG changeset patch # User Pierre-Yves David # Date 1490533569 -7200 # Node ID 7e7743a01103b69131acb85aca2170bf8d727695 # Parent bf6b44da1d8e922229a4002778f70293ceb6bfab crecord: ensure we reinstall the SIGWINCH handler Previous, exception in _main(...) would prevent the reinstallation of the signal. diff -r bf6b44da1d8e -r 7e7743a01103 mercurial/crecord.py --- a/mercurial/crecord.py Sun Mar 26 15:05:12 2017 +0200 +++ b/mercurial/crecord.py Sun Mar 26 15:06:09 2017 +0200 @@ -1616,8 +1616,10 @@ origsigwinchhandler = signal.signal(signal.SIGWINCH, self.sigwinchhandler) - return self._main(stdscr) - signal.signal(signal.SIGWINCH, origsigwinchhandler) + try: + return self._main(stdscr) + finally: + signal.signal(signal.SIGWINCH, origsigwinchhandler) def _main(self, stdscr): self.stdscr = stdscr