Skip to content

Commit

Permalink
supress message if not verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
zoghbi-a committed Oct 18, 2023
1 parent 7cf4f25 commit 5a1d697
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyvo/utils/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a1d697

Please sign in to comment.