@@ -63,7 +63,7 @@ def support_xz():
63
63
except tarfile.CompressionError:
64
64
return False
65
65
66
- def get(base, url, path, checksums, verbose=False, do_verify=True, help_on_error=None ):
66
+ def get(base, url, path, checksums, verbose=False, do_verify=True):
67
67
with tempfile.NamedTemporaryFile(delete=False) as temp_file:
68
68
temp_path = temp_file.name
69
69
@@ -86,7 +86,7 @@ def get(base, url, path, checksums, verbose=False, do_verify=True, help_on_error
86
86
print("ignoring already-download file",
87
87
path, "due to failed verification")
88
88
os.unlink(path)
89
- download(temp_path, "{}/{}".format(base, url), True, verbose, help_on_error=help_on_error )
89
+ download(temp_path, "{}/{}".format(base, url), True, verbose)
90
90
if do_verify and not verify(temp_path, sha256, verbose):
91
91
raise RuntimeError("failed verification")
92
92
if verbose:
@@ -99,17 +99,17 @@ def get(base, url, path, checksums, verbose=False, do_verify=True, help_on_error
99
99
os.unlink(temp_path)
100
100
101
101
102
- def download(path, url, probably_big, verbose, help_on_error=None ):
102
+ def download(path, url, probably_big, verbose):
103
103
for _ in range(0, 4):
104
104
try:
105
- _download(path, url, probably_big, verbose, True, help_on_error=help_on_error )
105
+ _download(path, url, probably_big, verbose, True)
106
106
return
107
107
except RuntimeError:
108
108
print("\nspurious failure, trying again")
109
- _download(path, url, probably_big, verbose, False, help_on_error=help_on_error )
109
+ _download(path, url, probably_big, verbose, False)
110
110
111
111
112
- def _download(path, url, probably_big, verbose, exception, help_on_error=None ):
112
+ def _download(path, url, probably_big, verbose, exception):
113
113
# Try to use curl (potentially available on win32
114
114
# https://devblogs.microsoft.com/commandline/tar-and-curl-come-to-windows/)
115
115
# If an error occurs:
@@ -134,7 +134,7 @@ def _download(path, url, probably_big, verbose, exception, help_on_error=None):
134
134
"--retry", "3", "-Sf", "-o", path, url],
135
135
verbose=verbose,
136
136
exception=True, # Will raise RuntimeError on failure
137
- help_on_error=help_on_error )
137
+ )
138
138
except (subprocess.CalledProcessError, OSError, RuntimeError):
139
139
# see http://serverfault.com/questions/301128/how-to-download
140
140
if platform_is_win32:
@@ -186,7 +186,7 @@ def unpack(tarball, tarball_suffix, dst, verbose=False, match=None):
186
186
shutil.rmtree(os.path.join(dst, fname))
187
187
188
188
189
- def run(args, verbose=False, exception=False, is_bootstrap=False, help_on_error=None, **kwargs):
189
+ def run(args, verbose=False, exception=False, is_bootstrap=False, **kwargs):
190
190
"""Run a child program in a new process"""
191
191
if verbose:
192
192
print("running: " + ' '.join(args))
@@ -197,8 +197,6 @@ def run(args, verbose=False, exception=False, is_bootstrap=False, help_on_error=
197
197
code = ret.wait()
198
198
if code != 0:
199
199
err = "failed to run: " + ' '.join(args)
200
- if help_on_error is not None:
201
- err += "\n" + help_on_error
202
200
if verbose or exception:
203
201
raise RuntimeError(err)
204
202
# For most failures, we definitely do want to print this error, or the user will have no
0 commit comments