Commits

mattip committed 0b28e98

prevent unexpected failures from opening the dreaded AppCrash dialog box on windows

  • Participants
  • Parent commits 81fa7d1

Comments (0)

Files changed (1)

rpython/translator/c/genc.py

 
     def cmdexec(self, args='', env=None, err=False, expect_crash=False):
         assert self._compiled
-        if expect_crash and sys.platform == 'win32':
+        if sys.platform == 'win32':
             #Prevent opening a dialog box
             import ctypes
             winapi = ctypes.windll.kernel32
             SetErrorMode(old_mode | flags)
         res = self.translator.platform.execute(self.executable_name, args,
                                                env=env)
-        if expect_crash and sys.platform == 'win32':
+        if sys.platform == 'win32':
             SetErrorMode(old_mode)
         if res.returncode != 0:
             if expect_crash: