aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattip <unknown>2012-02-27 22:36:59 +0200
committermattip <unknown>2012-02-27 22:36:59 +0200
commit5dd1ed51e759e4699b944779e8a1b09ff46efd45 (patch)
treeb33b7b8b5369ffd5d61ed335c06d2d4a1dca1bce /testrunner
parentmerge with default (diff)
downloadpypy-5dd1ed51e759e4699b944779e8a1b09ff46efd45.tar.gz
pypy-5dd1ed51e759e4699b944779e8a1b09ff46efd45.tar.bz2
pypy-5dd1ed51e759e4699b944779e8a1b09ff46efd45.zip
remove warning while running runner.py
Diffstat (limited to 'testrunner')
-rw-r--r--testrunner/runner.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/testrunner/runner.py b/testrunner/runner.py
index 8fa0800663..fdb37a0ac8 100644
--- a/testrunner/runner.py
+++ b/testrunner/runner.py
@@ -24,13 +24,16 @@ if sys.platform == 'win32':
#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'