Skip to content

Commit 4b63b0a

Browse files
committed
Added a few clarifications to _requests_progress_bar
1 parent dbace5a commit 4b63b0a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

package/MDAnalysis/web/downloaders.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ def convert_to_universe(self, **kwargs):
7575

7676
def _requests_progress_bar(requests_response, file_name, file_writer, return_writer=False):
7777
"""Puts a progress bar while writing a file_like object from the web"""
78-
chunk_size = 1
78+
chunk_size = 1 # Files are so small that you can read them one byte at a time
7979
r = requests_response
8080

8181
with ProgressBar(total=len(r.content), unit='B', unit_scale=True, desc=file_name) as pb:
82-
for i in r.iter_content(chunk_size=chunk_size):
83-
file_writer.write(i)
82+
for byte in r.iter_content(chunk_size=chunk_size):
83+
file_writer.write(byte)
8484
pb.update(chunk_size)
8585

8686
if return_writer:

0 commit comments

Comments
 (0)