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

Unified Diff: build/android/pylib/utils/md5sum.py

Issue 1085713002: [Android] DeviceUtils change to make Install work without md5 binary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 | « build/android/pylib/device/device_utils.py ('k') | build/android/pylib/utils/md5sum_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/md5sum.py
diff --git a/build/android/pylib/utils/md5sum.py b/build/android/pylib/utils/md5sum.py
index 4d7d0b0020454018821f285ad4f4acc21a7202ef..d59245c84544f58642bb03a08e85571dd406032c 100644
--- a/build/android/pylib/utils/md5sum.py
+++ b/build/android/pylib/utils/md5sum.py
@@ -34,9 +34,11 @@ def CalculateHostMd5Sums(paths):
if isinstance(paths, basestring):
paths = [paths]
- out = cmd_helper.GetCmdOutput(
- [os.path.join(constants.GetOutDirectory(), 'md5sum_bin_host')] +
- [p for p in paths])
+ md5sum_bin_host_path = os.path.join(
+ constants.GetOutDirectory(), 'md5sum_bin_host')
+ if not os.path.exists(md5sum_bin_host_path):
+ raise IOError('File not built: %s' % md5sum_bin_host_path)
+ out = cmd_helper.GetCmdOutput([md5sum_bin_host_path] + [p for p in paths])
return _ParseMd5SumOutput(out.splitlines())
@@ -53,9 +55,10 @@ def CalculateDeviceMd5Sums(paths, device):
paths = [paths]
if not device.FileExists(MD5SUM_DEVICE_BIN_PATH):
- device.adb.Push(
- os.path.join(constants.GetOutDirectory(), 'md5sum_dist'),
- MD5SUM_DEVICE_LIB_PATH)
+ md5sum_dist_path = os.path.join(constants.GetOutDirectory(), 'md5sum_dist')
+ if not os.path.exists(md5sum_dist_path):
+ raise IOError('File not built: %s' % md5sum_dist_path)
+ device.adb.Push(md5sum_dist_path, MD5SUM_DEVICE_LIB_PATH)
out = []
« no previous file with comments | « build/android/pylib/device/device_utils.py ('k') | build/android/pylib/utils/md5sum_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698