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