From 5d16cd0e3a9166449f50e93e6b518fd4f177c209 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 20 Sep 2020 18:29:12 -0700 Subject: [PATCH] Use pathclass.Path.open. --- droidz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/droidz.py b/droidz.py index ffcd992..2fd371c 100644 --- a/droidz.py +++ b/droidz.py @@ -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':