mirror of https://github.com/python/cpython
Move .setupterm() output so that we don't try to call endwin() if it fails
This commit is contained in:
parent
c6b5200931
commit
aa5e3cea7a
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue