Author: mattip Branch: Changeset: r50774:b16fca1fa6ec Date: 2011-12-20 22:39 +0200 http://bitbucket.org/pypy/pypy/changeset/b16fca1fa6ec/
Log: prevent system error dialog on windows diff --git a/testrunner/runner.py b/testrunner/runner.py --- a/testrunner/runner.py +++ b/testrunner/runner.py @@ -21,6 +21,16 @@ win32api.CloseHandle(proch) except pywintypes.error, e: pass + #Try to avoid opeing a dialog box if one of the tests causes a system error + import ctypes + winapi = ctypes.windll.kernel32 + SEM_FAILCRITICALERRORS = 1 + SEM_NOGPFAULTERRORBOX = 2 + SEM_NOOPENFILEERRORBOX = 0x8000 + flags = SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX + #Since there is no GetErrorMode, do a double Set + old_mode = winapi.SetErrorMode(flags) + winapi.SetErrorMode(old_mode | flags) SIGKILL = SIGTERM = 0 READ_MODE = 'rU' _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit