We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f999fe commit 8c1e10fCopy full SHA for 8c1e10f
builder/tools/fileoperations.py
@@ -49,11 +49,11 @@ def download(url: str) -> None:
49
else:
50
with requests.get(url, stream=True, headers={"referer": url}) as r:
51
r.raise_for_status()
52
- with open(fn, "wb", encoding="utf-8") as f:
+ with open(fn, "wb") as f:
53
for chunk in r.iter_content(chunk_size=8192):
54
f.write(chunk)
55
- except Exception:
56
- msg.error("Download failed.")
+ except Exception as e:
+ msg.error(f"Download failed: {e}")
57
msg.done("Done!")
58
59
0 commit comments