From 5a1d6977abb6b2b2b20145f15c79ee965df6ef71 Mon Sep 17 00:00:00 2001 From: Abdu Zoghbi Date: Wed, 18 Oct 2023 10:43:17 -0400 Subject: [PATCH] supress message if not verbose --- pyvo/utils/download.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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