Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r63289:3befe7a7717e
Date: 2013-04-12 14:12 -0400
http://bitbucket.org/pypy/pypy/changeset/3befe7a7717e/

Log:    another cleanup

diff --git a/rpython/rtyper/lltypesystem/test/test_llarena.py 
b/rpython/rtyper/lltypesystem/test/test_llarena.py
--- a/rpython/rtyper/lltypesystem/test/test_llarena.py
+++ b/rpython/rtyper/lltypesystem/test/test_llarena.py
@@ -326,15 +326,15 @@
         t, cbuilder = self.compile(fn)
         data = cbuilder.cmdexec('0')
         assert data == '133\n'
-        if sys.platform.startswith('win'):
-            # Do not open error dialog box
-            import ctypes
-            SEM_NOGPFAULTERRORBOX = 0x0002 # From MSDN
-            old_err_mode = ctypes.windll.kernel32.GetErrorMode()
-            new_err_mode = old_err_mode | SEM_NOGPFAULTERRORBOX
-            ctypes.windll.kernel32.SetErrorMode(new_err_mode)
         if has_protect:
+            if sys.platform.startswith('win'):
+                # Do not open error dialog box
+                import ctypes
+                SEM_NOGPFAULTERRORBOX = 0x0002 # From MSDN
+                old_err_mode = ctypes.windll.kernel32.GetErrorMode()
+                new_err_mode = old_err_mode | SEM_NOGPFAULTERRORBOX
+                ctypes.windll.kernel32.SetErrorMode(new_err_mode)
             cbuilder.cmdexec('1', expect_crash=True)
             cbuilder.cmdexec('2', expect_crash=True)
-        if sys.platform.startswith('win'):
-            ctypes.windll.kernel32.SetErrorMode(old_err_mode)
+            if sys.platform.startswith('win'):
+                ctypes.windll.kernel32.SetErrorMode(old_err_mode)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to