Use pathclass.Path.makedirs.
This commit is contained in:
parent
5d16cd0e3a
commit
173dd60451
1 changed files with 1 additions and 1 deletions
|
@ -298,7 +298,7 @@ def download_stick(id, overwrite=False, extract=False):
|
||||||
print(f'Downloading {id}')
|
print(f'Downloading {id}')
|
||||||
response = request(download_link)
|
response = request(download_link)
|
||||||
|
|
||||||
os.makedirs(directory.absolute_path, exist_ok=True)
|
directory.makedirs(exist_ok=True)
|
||||||
with filepath.open('wb') as handle:
|
with filepath.open('wb') as handle:
|
||||||
handle.write(response.content)
|
handle.write(response.content)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue