mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 04:02:32 +01:00
fix issue with Ctrl+c on windows
This commit is contained in:
parent
140f0475a6
commit
a8c0b4531d
@ -11,7 +11,7 @@
|
||||
import os
|
||||
|
||||
class BasicDownloader():
|
||||
"""Base class for downlaoder modules"""
|
||||
"""Base class for downloader modules"""
|
||||
|
||||
max_tries = 5
|
||||
|
||||
@ -21,7 +21,8 @@ class BasicDownloader():
|
||||
try:
|
||||
return self.download_impl(url, file)
|
||||
except:
|
||||
# make sure to remove file if download failed
|
||||
#remove file if download failed
|
||||
file.close()
|
||||
os.unlink(path)
|
||||
raise
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user