Mercurial > ~astiob > upreckon > hgweb
diff testcases.py @ 72:7520b6bb6636
Windows Error Reporting is now suppressed (at least the dialogs)
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Thu, 06 Jan 2011 17:51:59 +0200 |
parents | 1bee3a0beeb5 |
children | 0e5ae28e0b2b |
line wrap: on
line diff
--- a/testcases.py Mon Jan 03 01:48:02 2011 +0200 +++ b/testcases.py Thu Jan 06 17:51:59 2011 +0200 @@ -38,6 +38,19 @@ TerminateProcess = None +# Do not show error messages due to errors in the program being tested +try: + import ctypes + try: + errmode = ctypes.windll.kernel32.GetErrorMode() + except AttributeError: + errmode = ctypes.windll.kernel32.SetErrorMode(0) + errmode |= 0x8003 + ctypes.windll.kernel32.SetErrorMode(errmode) +except Exception: + pass + + # Do the hacky-wacky dark magic needed to catch presses of the Escape button. # If only Python supported forcible termination of threads... if not sys.stdin.isatty():