From: Andrew M. Kuchling Date: Mon, 25 Feb 2008 16:29:19 +0000 (+0000) Subject: Move .setupterm() output so that we don't try to call endwin() if it fails X-Git-Tag: v2.6a1~56 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa5e3cea7aeabd4d1c2ad61a60b538c0f842799d;p=python Move .setupterm() output so that we don't try to call endwin() if it fails --- diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index b236f35b18..d1b80f88dc 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -269,13 +269,12 @@ if __name__ == '__main__': curses.wrapper(main) unit_tests() else: + # testing setupterm() inside initscr/endwin + # causes terminal breakage + curses.setupterm(fd=sys.__stdout__.fileno()) try: - # testing setupterm() inside initscr/endwin - # causes terminal breakage - curses.setupterm(fd=sys.__stdout__.fileno()) stdscr = curses.initscr() main(stdscr) finally: curses.endwin() - unit_tests()