[Python-checkins] cpython (merge 3.3 -> default): #11732: merge with 3.3.

ezio.melotti python-checkins at python.org
Thu Mar 7 17:39:12 CET 2013


http://hg.python.org/cpython/rev/831035bda9b7
changeset: 82526:831035bda9b7
parent: 82524:a1373861f62f
parent: 82525:6ccefddc13fd
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Thu Mar 07 18:38:45 2013 +0200
summary:
 #11732: merge with 3.3.
files:
 Lib/test/support.py | 4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/test/support.py b/Lib/test/support.py
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -1913,10 +1913,12 @@
 def suppress_crash_popup():
 """Disable Windows Error Reporting dialogs using SetErrorMode."""
 # see http://msdn.microsoft.com/en-us/library/windows/desktop/ms680621%28v=vs.85%29.aspx
+ # GetErrorMode is not available on Windows XP and Windows Server 2003,
+ # but SetErrorMode returns the previous value, so we can use that
 import ctypes
 k32 = ctypes.windll.kernel32
- old_error_mode = k32.GetErrorMode()
 SEM_NOGPFAULTERRORBOX = 0x02
+ old_error_mode = k32.SetErrorMode(SEM_NOGPFAULTERRORBOX)
 k32.SetErrorMode(old_error_mode | SEM_NOGPFAULTERRORBOX)
 try:
 yield
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /