Update Python download scripts to use makedirs
Change-Id: Ia2d4da95bc1ffb1b449d2b5972926d6cc927e982
diff --git a/download_iree_compiler.py b/download_iree_compiler.py
index 8095a60..7ecae06 100755
--- a/download_iree_compiler.py
+++ b/download_iree_compiler.py
@@ -29,7 +29,7 @@
print("\nDownload %s from %s\n" % (artifact_name, download_url))
if not os.path.isdir(out_dir):
- os.mkdir(out_dir)
+ os.makedirs(out_dir)
out_file = os.path.join(out_dir, artifact_name)
num_retries = 3
@@ -117,7 +117,7 @@
# Extract the tarball to ${iree_compiler_dir}/install
install_dir = iree_compiler_dir / "install"
if not install_dir:
- os.mkdir(install_dir)
+ os.makedirs(install_dir)
tar = tarfile.open(tar_file)
tar.extractall(path=install_dir)
diff --git a/download_renode.py b/download_renode.py
index 4c35e99..4858cb4 100755
--- a/download_renode.py
+++ b/download_renode.py
@@ -17,7 +17,7 @@
def download_artifact(url, artifact_name, out_dir):
"""Download the artifact from url."""
if not os.path.isdir(out_dir):
- os.mkdir(out_dir)
+ os.makedirs(out_dir)
out_file = os.path.join(out_dir, artifact_name)
download_url = os.path.join(url, artifact_name)
num_retries = 3
@@ -101,7 +101,7 @@
renode_dir = Path(args.renode_dir)
if not os.path.isdir(renode_dir):
- os.mkdir(renode_dir)
+ os.makedirs(renode_dir)
tag_file = renode_dir / "tag"
# Check the tag of the existing download.