From 82ea27a94a575ef1db382e70c05d38797c22ad6d Mon Sep 17 00:00:00 2001 From: techtonik Date: Thu, 22 Oct 2015 12:09:14 -0700 Subject: Do not fail checksum check before download BUG= Review URL: https://codereview.chromium.org/1413663005 Cr-Commit-Position: refs/heads/master@{#355597} --- native_client_sdk/src/AUTHORS | 1 + native_client_sdk/src/build_tools/sdk_tools/command/update.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'native_client_sdk') diff --git a/native_client_sdk/src/AUTHORS b/native_client_sdk/src/AUTHORS index ca2a76f..31be971 100644 --- a/native_client_sdk/src/AUTHORS +++ b/native_client_sdk/src/AUTHORS @@ -10,3 +10,4 @@ Eduardo Lima (Etrunko) Eduardo Lima (Etrunko) Matthew Turk Soeren Balko +anatoly techtonik diff --git a/native_client_sdk/src/build_tools/sdk_tools/command/update.py b/native_client_sdk/src/build_tools/sdk_tools/command/update.py index e49765bb..5ad5b82 100644 --- a/native_client_sdk/src/build_tools/sdk_tools/command/update.py +++ b/native_client_sdk/src/build_tools/sdk_tools/command/update.py @@ -74,7 +74,7 @@ class RealUpdateDelegate(UpdateDelegate): archive.size, filename)) return False sha1_hash = hashlib.sha1() - with open(filename) as f: + with open(filename, 'rb') as f: sha1_hash.update(f.read()) if sha1_hash.hexdigest() != archive.GetChecksum(): logging.info('File hash does not match: %s.' % filename) -- cgit v1.1