mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-02 01:18:08 +01:00
Support multiple mirrors for each source file
If multiple URLs are entered in a sources listing for the same file, each will be tried in turn, until either one succeeds, or we fail having run out of mirrors.
This commit is contained in:
parent
86e1a5e7f6
commit
89a4d18ff0
3 changed files with 52 additions and 5 deletions
|
|
@ -12,6 +12,7 @@ import hashlib
|
|||
import os
|
||||
import shutil
|
||||
import tarfile
|
||||
import traceback
|
||||
import requests
|
||||
|
||||
# pylint: disable=too-many-instance-attributes
|
||||
|
|
@ -305,7 +306,12 @@ this script the next time")
|
|||
def get_packages(self):
|
||||
"""Prepare remaining sources"""
|
||||
for line in self.source_manifest:
|
||||
path = self.download_file(line[2], line[1], line[3])
|
||||
try:
|
||||
path = self.download_file(line[2], line[1], line[3])
|
||||
except requests.HTTPError:
|
||||
print(traceback.format_exc())
|
||||
for line in self.source_manifest:
|
||||
path = os.path.join(line[1], line[3])
|
||||
self.check_file(path, line[0])
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue