projects
/
platform
/
upstream
/
caffeonacl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
faba632
)
Read the data as a binary
author
ebadawy
<ehalbadawy93@gmail.com>
Sun, 24 Apr 2016 18:24:41 +0000
(20:24 +0200)
committer
ebadawy
<ehalbadawy93@gmail.com>
Sun, 24 Apr 2016 18:25:45 +0000
(20:25 +0200)
Appending 'b' in the file mode as hashlib functions require to pass in bytes
scripts/download_model_binary.py
patch
|
blob
|
history
diff --git
a/scripts/download_model_binary.py
b/scripts/download_model_binary.py
index
66f72f2
..
fcdbb5a
100755
(executable)
--- a/
scripts/download_model_binary.py
+++ b/
scripts/download_model_binary.py
@@
-60,7
+60,7
@@
if __name__ == '__main__':
# Closure-d function for checking SHA1.
def model_checks_out(filename=model_filename, sha1=frontmatter['sha1']):
- with open(filename, 'r') as f:
+ with open(filename, 'r
b
') as f:
return hashlib.sha1(f.read()).hexdigest() == sha1
# Check if model exists.