diff --git a/pyvo/utils/download.py b/pyvo/utils/download.py index 9c259acbe..cd9b87144 100644 --- a/pyvo/utils/download.py +++ b/pyvo/utils/download.py @@ -244,8 +244,8 @@ def aws_download(uri=None, warn('Found cached file but it has the wrong size. Overwriting ...', category=PyvoUserWarning) - msg = f'Downloading {key} to {local_filepath} ...' if verbose else '' - with ProgressBarOrSpinner(length, msg) as pb: + file = None if verbose else os.devnull + with ProgressBarOrSpinner(length, (f'Downloading {key} to {local_filepath} ...'), file=file) as pb: # Bytes read tracks how much data has been received so far # This variable will be updated in multiple threads below