Commit fbd1c164 by Balint Cristian Committed by Haichen Shen

Fix makedirs() condition in contrib. (#2942)

parent ee95f6c8
...@@ -59,7 +59,7 @@ def download(url, path, overwrite=False, size_compare=False, verbose=1, retries= ...@@ -59,7 +59,7 @@ def download(url, path, overwrite=False, size_compare=False, verbose=1, retries=
# Stateful start time # Stateful start time
start_time = time.time() start_time = time.time()
dirpath = os.path.dirname(path) dirpath = os.path.dirname(path)
if not os.path.isdir(dirpath): if dirpath and not os.path.isdir(dirpath):
os.makedirs(dirpath) os.makedirs(dirpath)
random_uuid = str(uuid.uuid4()) random_uuid = str(uuid.uuid4())
tempfile = os.path.join(dirpath, random_uuid) tempfile = os.path.join(dirpath, random_uuid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment