Added a new optional parameter verbose to the download_file function. This parameter, when set to True, will print messages to the console indicating the download progress. By default, it is set to True.
Wrapped the call to _get_remote_file_properties in a try-except block. This is to handle any exceptions that might occur during the call (e.g., a non-existing URL) and raise a DownloadError with a descriptive message.
I would be happy to replace this with a logger in the future to make it more clear.
Added a new optional parameter verbose to the
download_file
function. This parameter, when set toTrue
, will print messages to the console indicating the download progress. By default, it is set toTrue
.Wrapped the call to
_get_remote_file_properties
in atry-except
block. This is to handle any exceptions that might occur during the call (e.g., a non-existing URL) and raise aDownloadError
with a descriptive message.I would be happy to replace this with a logger in the future to make it more clear.