crecord: ensure we reinstall the SIGWINCH handler
Previous, exception in _main(...) would prevent the reinstallation of the
signal.
--- 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