瀏覽代碼

Update compileall.py

blueloveTH 1 月之前
父節點
當前提交
f3bf7c6321
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      compileall.py

+ 3 - 2
compileall.py

@@ -12,8 +12,9 @@ output_dir = sys.argv[3]
 def do_compile(src_path, dst_path):
 def do_compile(src_path, dst_path):
     assert os.path.isfile(src_path)
     assert os.path.isfile(src_path)
     cmd = f'{pkpy_exe} --compile "{src_path}" "{dst_path}"'
     cmd = f'{pkpy_exe} --compile "{src_path}" "{dst_path}"'
-    print(src_path)
-    assert os.system(cmd) == 0
+    if os.system(cmd) != 0:
+        print(src_path)
+        exit(1)
 
 
 if os.path.isfile(source_dir):
 if os.path.isfile(source_dir):
     if output_dir.endswith('.py'):
     if output_dir.endswith('.py'):