Przeglądaj źródła

makepanda: Properly detect keyboard interrupts on Windows

rdb 3 lat temu
rodzic
commit
3c142a61ab
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      makepanda/makepandacore.py

+ 3 - 0
makepanda/makepandacore.py

@@ -635,6 +635,9 @@ def oscmd(cmd, ignoreError = False, cwd=None):
 
         res = os.spawnl(os.P_WAIT, exe_path, cmd)
 
+        if res == -1073741510: # 0xc000013a
+            exit("keyboard interrupt")
+
         if cwd is not None:
             os.chdir(pwd)
     else: