18try:
19 import lzma
20▶except ImportError:
21 lzma = None
22
· · ·
41 try:
42 return cpu_count()
43▶ except NotImplementedError:
44 return 1
45
· · ·
56 try:
57 if url not in checksums:
58▶ raise RuntimeError(
59 (
60 "src/stage0 doesn't contain a checksum for {}. "
· · ·
80 download(temp_path, "{}/{}".format(base, url), True, verbose)
81 if not verify(temp_path, sha256, verbose):
82▶ raise RuntimeError("failed verification")
83 if verbose > 0:
84 eprint("moving {} to {}".format(temp_path, path))
· · ·
103 _download(path, url, probably_big, verbose, True)
104 return
105▶ except RuntimeError:
106 eprint("\nspurious failure, trying again")
107 _download(path, url, probably_big, verbose, False)
+ 38 more matches in this file