Skip to content

Commit

Permalink
fix: Fix _archives creation (#997)
Browse files Browse the repository at this point in the history
  • Loading branch information
limakzi authored Aug 28, 2024
1 parent fa85676 commit 987ac43
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def download(url: str, dst: str) -> None:
"""Download the file at the given URL `url` to the file with path `dst`."""
response = requests.get(url, stream=True)
response.raise_for_status() # raise a meaningful (?) exception if there was e.g. a 404 error
os.makedirs(os.path.dirname(dst), exist_ok=True)
with open(dst, "wb") as f:
for chunk in response.raw.stream(16384, decode_content=False):
if chunk:
Expand Down

0 comments on commit 987ac43

Please sign in to comment.