Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Side by Side Diff: build/download_utils.py

Issue 12450015: **/*.py: use /usr/bin/env to find python Base URL: https://chromium.googlesource.com/native_client/src/native_client@master
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/download_toolchains.py ('k') | build/fake_storage.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """A library to assist automatically downloading files. 6 """A library to assist automatically downloading files.
7 7
8 This library is used by scripts that download tarballs, zipfiles, etc. as part 8 This library is used by scripts that download tarballs, zipfiles, etc. as part
9 of the build process. 9 of the build process.
10 """ 10 """
11 11
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 EnsureFileCanBeWritten(filename) 310 EnsureFileCanBeWritten(filename)
311 http_download.HttpDownload(url, filename) 311 http_download.HttpDownload(url, filename)
312 312
313 if hash_val: 313 if hash_val:
314 tar_hash = HashFile(filename) 314 tar_hash = HashFile(filename)
315 if hash_val != tar_hash: 315 if hash_val != tar_hash:
316 raise HashError(actual_hash=tar_hash, expected_hash=hash_val, 316 raise HashError(actual_hash=tar_hash, expected_hash=hash_val,
317 download_url=url) 317 download_url=url)
318 318
319 return True 319 return True
OLDNEW
« no previous file with comments | « build/download_toolchains.py ('k') | build/fake_storage.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698