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

Side by Side Diff: build_tools/sha1sum.py

Issue 12412021: Don't hardcode Python path (Closed) Base URL: http://naclports.googlecode.com/svn/trunk/src/
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 | Annotate | Revision Log
« no previous file with comments | « build_tools/sha1check.py ('k') | experimental/libav/voronoi/run.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) 2011 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2011 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 import hashlib 6 import hashlib
7 import os 7 import os
8 import string 8 import string
9 import sys 9 import sys
10 10
11 # usage: 11 # usage:
(...skipping 15 matching lines...) Expand all
27 h.update(f.read()) 27 h.update(f.read())
28 filehash = h.hexdigest() 28 filehash = h.hexdigest()
29 f.close() 29 f.close()
30 print filehash.lower() + " *" + os.path.basename(filename) 30 print filehash.lower() + " *" + os.path.basename(filename)
31 except IOError: 31 except IOError:
32 sys.stderr.write("sha1sum.py unable to open file %s\n" % filename) 32 sys.stderr.write("sha1sum.py unable to open file %s\n" % filename)
33 sys.exit(-1) 33 sys.exit(-1)
34 34
35 # all files hashed with success 35 # all files hashed with success
36 sys.exit(0) 36 sys.exit(0)
OLDNEW
« no previous file with comments | « build_tools/sha1check.py ('k') | experimental/libav/voronoi/run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698