Merge pull request #115 from tejom/add_keyboard_interupt
Catch KeyboardInterupt in download_file
This commit is contained in:
4
emsdk
4
emsdk
@@ -487,6 +487,10 @@ def download_file(url, dstpath, download_even_if_exists=False, filename_prefix =
|
||||
print("Error downloading URL '" + url + "': " + str(e))
|
||||
rmfile(file_name)
|
||||
return None
|
||||
except KeyboardInterrupt as e:
|
||||
print("Aborted by User, exiting")
|
||||
rmfile(file_name)
|
||||
exit(1)
|
||||
return file_name
|
||||
|
||||
def download_text_file(url, dstpath, download_even_if_exists=False, filename_prefix=''):
|
||||
|
||||
Reference in New Issue
Block a user