[Python-checkins] (merge 3.2 -> default): Issue #5622: merge fix from 3.2.
ned.deily
python-checkins at python.org
Wed Mar 9 11:50:50 CET 2011
http://hg.python.org/cpython/rev/ec717db610df
changeset: 68341:ec717db610df
parent: 68337:1947cca7f583
parent: 68340:e6c45cd46cb2
user: Ned Deily <nad at acm.org>
date: Wed Mar 09 02:49:59 2011 -0800
summary:
Issue #5622: merge fix from 3.2.
files:
Misc/NEWS
diff --git a/Lib/curses/wrapper.py b/Lib/curses/wrapper.py
--- a/Lib/curses/wrapper.py
+++ b/Lib/curses/wrapper.py
@@ -43,7 +43,8 @@
return func(stdscr, *args, **kwds)
finally:
# Set everything back to normal
- stdscr.keypad(0)
- curses.echo()
- curses.nocbreak()
- curses.endwin()
+ if 'stdscr' in locals():
+ stdscr.keypad(0)
+ curses.echo()
+ curses.nocbreak()
+ curses.endwin()
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -55,6 +55,9 @@
Library
-------
+- Issue #5622: Fix curses.wrapper to raise correct exception if curses
+ initialization fails.
+
- Issue #11408: In threading.Lock.acquire(), only call gettimeofday() when
really necessary. Patch by Charles-François Natali.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list