fix issue with Ctrl+c on windows

This commit is contained in:
Mike Fährmann
2015-12-02 01:01:33 +01:00
parent 140f0475a6
commit a8c0b4531d

View File

@@ -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