Commit aa5e3cea authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

Move .setupterm() output so that we don't try to call endwin() if it fails

parent c6b52009
......@@ -269,13 +269,12 @@ if __name__ == '__main__':
curses.wrapper(main)
unit_tests()
else:
try:
# testing setupterm() inside initscr/endwin
# causes terminal breakage
curses.setupterm(fd=sys.__stdout__.fileno())
try:
stdscr = curses.initscr()
main(stdscr)
finally:
curses.endwin()
unit_tests()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment