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

Unified Diff: build/android/pylib/device/device_utils.py

Issue 1106573002: [Android] Fix checksum handling when md5sum generates unexpected output. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/pylib/utils/md5sum.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_utils.py
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index ddda0178bc8a60603c0475c4e6f8f005e03b6ddc..59266781b1dd39f6ba2d6d6b24bad80fa7392e11 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -863,8 +863,17 @@ class DeviceUtils(object):
device_paths_to_md5, self)
if os.path.isfile(host_path):
- if (not device_hash_tuples
- or device_hash_tuples[0].hash != host_hash_tuples[0].hash):
+ host_hash = None
+ for h, p in host_hash_tuples or ():
+ if p == real_host_path:
+ host_hash = h
+
+ device_hash = None
+ for h, p in device_hash_tuples or ():
+ if p == real_device_path:
+ device_hash = h
perezju 2015/04/23 09:54:59 really sounds like md5sum functions should return
jbudorick 2015/04/23 16:20:14 I suppose so. Done.
+
+ if host_hash != device_hash:
return [(host_path, device_path)]
else:
return []
« no previous file with comments | « no previous file | build/android/pylib/utils/md5sum.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698