Skip to content

Commit c255ec7

Browse files
committed
---
yaml --- r: 278156 b: refs/heads/auto c: 18dafe8 h: refs/heads/master
1 parent 1539601 commit c255ec7

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
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: f5884f6824291cda15096d84af9e346e13a41578
11+
refs/heads/auto: 18dafe83b5411e76a13f5e813dae1bec71ef07a6
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/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)