Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Update flash/core/data/utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
  • Loading branch information
2 people authored and Borda committed Mar 10, 2021
1 parent 5003f7d commit a07f319
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flash/core/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def download_file(url: str, path: str, verbose: bool = False) -> None:

if not os.path.exists(local_filename):
r = requests.get(url, stream=True)
file_size = int(r.headers['Content-Length']) if 'Content-Length' in r.headers else 0
file_size = int(r.headers.get('Content-Length', 0))
chunk = 1
chunk_size = 1024
num_bars = int(file_size / chunk_size)
Expand Down

0 comments on commit a07f319

Please sign in to comment.