mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-16 00:05:24 +01:00
Various fixes from rebase
This took a while so a bunch of stuff got broken in rebase.
This commit is contained in:
parent
b614b3021d
commit
25f37ba926
28 changed files with 196 additions and 90 deletions
|
|
@ -95,13 +95,16 @@ this script the next time")
|
|||
os.mkdir(self.cache_dir)
|
||||
|
||||
# Actually download the file
|
||||
headers = {
|
||||
"Accept-Encoding": "identity"
|
||||
}
|
||||
if not os.path.isfile(abs_file_name):
|
||||
print(f"Downloading: {file_name}")
|
||||
response = requests.get(url, allow_redirects=True, stream=True)
|
||||
response = requests.get(url, allow_redirects=True, stream=True,
|
||||
headers=headers)
|
||||
if response.status_code == 200:
|
||||
with open(abs_file_name, 'wb') as target_file:
|
||||
for chunk in response.iter_content(chunk_size=None):
|
||||
target_file.write(chunk)
|
||||
target_file.write(response.raw.read())
|
||||
else:
|
||||
raise Exception("Download failed.")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue