浏览代码

Merge pull request #141 from alexandrevicenzi/dir

Use a more reliable way to create directories
Jason Antic 6 年之前
父节点
当前提交
88ed48c7df
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app_utils.py

+ 1 - 1
app_utils.py

@@ -106,7 +106,7 @@ def clean_all(files):
 
 
 def create_directory(path):
-    os.system("mkdir -p %s" % os.path.dirname(path))
+    os.makedirs(os.path.dirname(path), exist_ok=True)
 
 
 def get_model_bin(url, output_path):