parent
52cfd174f1
commit
2c1d0270c6
|
@ -1185,10 +1185,12 @@ if __name__ == "__main__":
|
||||||
curses.wrapper(run_app, buffers, **d)
|
curses.wrapper(run_app, buffers, **d)
|
||||||
err = 0
|
err = 0
|
||||||
except:
|
except:
|
||||||
|
# restore terminal state before printing an error
|
||||||
|
termios.tcsetattr(sys.stdin, termios.TCSANOW, attr)
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
err = 1
|
err = 1
|
||||||
|
|
||||||
# restore terminal state
|
# restore terminal state before exiting
|
||||||
termios.tcsetattr(sys.stdin, termios.TCSANOW, attr)
|
termios.tcsetattr(sys.stdin, termios.TCSANOW, attr)
|
||||||
ispell.free()
|
ispell.free()
|
||||||
sys.exit(err)
|
sys.exit(err)
|
||||||
|
|
Loading…
Reference in New Issue