Skip to content

Commit 9cb5502

Browse files
committed
Fix bug that reported an order of magnitude more downloaded data for the progress bar
1 parent 2fbf89c commit 9cb5502

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

astroquery/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def _download_file(self, url, local_filepath, timeout=None, auth=None,
423423
with open(local_filepath, open_mode) as f:
424424
for block in response.iter_content(blocksize):
425425
f.write(block)
426-
bytes_read += blocksize
426+
bytes_read += len(block)
427427
if length is not None:
428428
pb.update(bytes_read if bytes_read <= length else length)
429429
else:

0 commit comments

Comments
 (0)