fix traceback output

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2009-07-13 20:42:34 -04:00
parent 52cfd174f1
commit 2c1d0270c6
1 changed files with 3 additions and 1 deletions

View File

@ -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)