Skip to content

Commit ea09e23

Browse files
committed
---
yaml --- r: 276383 b: refs/heads/master c: 18dafe8 h: refs/heads/master i: 276381: 16f246e 276379: 84c2e04 276375: b851413 276367: 661802f 276351: a8307a2
1 parent d530fac commit ea09e23

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f5884f6824291cda15096d84af9e346e13a41578
2+
refs/heads/master: 18dafe83b5411e76a13f5e813dae1bec71ef07a6
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
44
refs/heads/try: 49312a405e14a449b98fe0056b12a40ac128be4a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/bootstrap/bootstrap.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,25 @@ def get(url, path, verbose=False):
2525
temp_path = temp_file.name
2626
sha_file = tempfile.NamedTemporaryFile(suffix=".sha256", delete=True)
2727
sha_path = sha_file.name
28-
download(sha_path, sha_url, temp_path, url, verbose)
28+
download(sha_path, sha_url, verbose)
29+
download(temp_path, url, verbose)
2930
verify(sha_path, temp_path, verbose)
3031
sha_file.close()
3132
print("moving " + temp_path + " to " + path)
3233
shutil.move(temp_path, path)
3334
temp_file.close()
3435

3536

36-
def download(sha_path, sha_url, temp_path, url, verbose):
37-
for _url, _path in ((url, temp_path), (sha_url, sha_path)):
38-
print("downloading " + _url + " to " + _path)
39-
# see http://serverfault.com/questions/301128/how-to-download
40-
if sys.platform == 'win32':
41-
run(["PowerShell.exe", "/nologo", "-Command",
42-
"(New-Object System.Net.WebClient)"
43-
".DownloadFile('{}', '{}')".format(_url, _path)],
44-
verbose=verbose)
45-
else:
46-
run(["curl", "-o", _path, _url], verbose=verbose)
37+
def download(path, url, verbose):
38+
print("downloading " + url + " to " + path)
39+
# see http://serverfault.com/questions/301128/how-to-download
40+
if sys.platform == 'win32':
41+
run(["PowerShell.exe", "/nologo", "-Command",
42+
"(New-Object System.Net.WebClient)"
43+
".DownloadFile('{}', '{}')".format(url, path)],
44+
verbose=verbose)
45+
else:
46+
run(["curl", "-o", path, url], verbose=verbose)
4747

4848

4949
def verify(sha_path, temp_path, verbose):

0 commit comments

Comments
 (0)