Commit d2853180 authored by Ned Deily's avatar Ned Deily

Issue #5622: Fix curses.wrapper to raise correct exception if curses

initialization fails.
parent c8ab6eeb
...@@ -43,7 +43,8 @@ def wrapper(func, *args, **kwds): ...@@ -43,7 +43,8 @@ def wrapper(func, *args, **kwds):
return func(stdscr, *args, **kwds) return func(stdscr, *args, **kwds)
finally: finally:
# Set everything back to normal # Set everything back to normal
stdscr.keypad(0) if 'stdscr' in locals():
curses.echo() stdscr.keypad(0)
curses.nocbreak() curses.echo()
curses.endwin() curses.nocbreak()
curses.endwin()
...@@ -37,6 +37,9 @@ Core and Builtins ...@@ -37,6 +37,9 @@ Core and Builtins
Library Library
------- -------
- Issue #5622: Fix curses.wrapper to raise correct exception if curses
initialization fails.
- Issue #11391: Writing to a mmap object created with - Issue #11391: Writing to a mmap object created with
``mmap.PROT_READ|mmap.PROT_EXEC`` would segfault instead of raising a ``mmap.PROT_READ|mmap.PROT_EXEC`` would segfault instead of raising a
TypeError. Patch by Charles-François Natali. TypeError. Patch by Charles-François Natali.
......
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