[pypy-commit] pypy win32-cleanup_2: remove warning while running runner.py
mattip
noreply at buildbot.pypy.org
Tue Mar 6 22:24:20 CET 2012
Author: mattip
Branch: win32-cleanup_2
Changeset: r53244:43d92b4ba4db
Date: 2012-02-27 22:36 +0200
http://bitbucket.org/pypy/pypy/changeset/43d92b4ba4db/
Log: remove warning while running runner.py
diff --git a/testrunner/runner.py b/testrunner/runner.py
--- a/testrunner/runner.py
+++ b/testrunner/runner.py
@@ -24,13 +24,16 @@
#Try to avoid opeing a dialog box if one of the tests causes a system error
import ctypes
winapi = ctypes.windll.kernel32
+ SetErrorMode = winapi.SetErrorMode
+ SetErrorMode.argtypes=[ctypes.c_int]
+
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)
+ old_mode = SetErrorMode(flags)
+ SetErrorMode(old_mode | flags)
SIGKILL = SIGTERM = 0
READ_MODE = 'rU'
More information about the pypy-commit
mailing list