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 f7167cea13a20e9401ff03556d1b4e49b8bddfb2..9a84b2a7db08f714d7f7f7091c03b6aefba204a8 100644 |
--- a/build/android/pylib/device/device_utils.py |
+++ b/build/android/pylib/device/device_utils.py |
@@ -818,13 +818,17 @@ class DeviceUtils(object): |
if not real_device_path: |
return [(host_path, device_path)] |
- host_hash_tuples = md5sum.CalculateHostMd5Sums([real_host_path]) |
- device_paths_to_md5 = ( |
- real_device_path if os.path.isfile(real_host_path) |
- else ('%s/%s' % (real_device_path, os.path.relpath(p, real_host_path)) |
- for _, p in host_hash_tuples)) |
- device_hash_tuples = md5sum.CalculateDeviceMd5Sums( |
- device_paths_to_md5, self) |
+ try: |
+ host_hash_tuples = md5sum.CalculateHostMd5Sums([real_host_path]) |
+ device_paths_to_md5 = ( |
+ real_device_path if os.path.isfile(real_host_path) |
+ else ('%s/%s' % (real_device_path, os.path.relpath(p, real_host_path)) |
+ for _, p in host_hash_tuples)) |
+ device_hash_tuples = md5sum.CalculateDeviceMd5Sums( |
+ device_paths_to_md5, self) |
+ except EnvironmentError as e: |
+ logging.warning('Error calculating md5: %s' % e) |
perezju
2015/04/15 09:36:18
nit: should be logging.warning('Error calculating
mikecase (-- gone --)
2015/04/21 16:54:33
Done.
|
+ return [(host_path, device_path)] |
if os.path.isfile(host_path): |
if (not device_hash_tuples |