mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 10:16:00 +00:00
Added makedirs in download_file
This commit is contained in:
1 parent
debcccbee2
commit
435e745fb5
1 file changed
+1
@@ -183,6 +183,7 @@ class FileUtils:
|
||||
"""
|
||||
Downloads the file from the given URL to the given {target_path}
|
||||
"""
|
||||
os.makedirs(os.path.dirname(target_path), exist_ok=True)
|
||||
try:
|
||||
response = requests.get(url, stream=True, timeout=60)
|
||||
if response.status_code != 200:
|
||||
|
||||
Reference in new issue
Block a user