diff --git a/.gitignore b/.gitignore index 3a64c4a..91c6caf 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ yarn-error.log* # Private configs /config.py /test.py +/config/ #build files /build diff --git a/deemix/downloader.py b/deemix/downloader.py index a9c7247..0c960de 100644 --- a/deemix/downloader.py +++ b/deemix/downloader.py @@ -329,6 +329,7 @@ class Downloader: with open(writepath, 'wb') as stream: streamTrack(stream, track, downloadObject=self.downloadObject, listener=self.listener) except requests.exceptions.HTTPError as e: + if writepath.is_file(): writepath.unlink() raise DownloadFailed('notAvailable', track) from e except OSError as e: if writepath.is_file(): writepath.unlink()