mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
crecord: extract most of 'main' into a sub function
There are some setup and cleanup necessary around the main code, that setup/cleanup code needs multiple adjustments so we extract the core code into its own function first for clarity.
This commit is contained in:
parent
35d42be491
commit
83f005a5e4
@ -1616,6 +1616,10 @@ are you sure you want to review/edit and confirm the selected changes [yn]?
|
||||
|
||||
origsigwinchhandler = signal.signal(signal.SIGWINCH,
|
||||
self.sigwinchhandler)
|
||||
return self._main(stdscr)
|
||||
signal.signal(signal.SIGWINCH, origsigwinchhandler)
|
||||
|
||||
def _main(self, stdscr):
|
||||
self.stdscr = stdscr
|
||||
# error during initialization, cannot be printed in the curses
|
||||
# interface, it should be printed by the calling code
|
||||
@ -1667,4 +1671,3 @@ are you sure you want to review/edit and confirm the selected changes [yn]?
|
||||
keypressed = "foobar"
|
||||
if self.handlekeypressed(keypressed):
|
||||
break
|
||||
signal.signal(signal.SIGWINCH, origsigwinchhandler)
|
||||
|
Loading…
Reference in New Issue
Block a user