in muss/utils/resources.py [0:0]
def download(url, destination_path=None, overwrite=True):
if destination_path is None:
destination_path = get_temp_filepath()
if not overwrite and destination_path.exists():
return destination_path
print('Downloading...')
try:
urlretrieve(url, destination_path, reporthook)
sys.stdout.write('\n')
except (Exception, KeyboardInterrupt, SystemExit):
print('Rolling back: remove partially downloaded file')
os.remove(destination_path)
raise
return destination_path