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

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

Issue 786123002: Update from https://crrev.com/307330 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/adb_wrapper.py ('k') | build/android/pylib/device/device_utils_test.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 66a62fd4b847f32f48bd8fb1b8ccec1eb5717caa..403f235eabdc6877bc79e225ecdf9a83ee08b693 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -855,11 +855,11 @@ class DeviceUtils(object):
CommandFailedError on failure.
CommandTimeoutError on timeout.
"""
- try:
- self.old_interface.PullFileFromDevice(device_path, host_path)
- except AssertionError as e:
- raise device_errors.CommandFailedError(
- str(e), str(self)), None, sys.exc_info()[2]
+ # Create the base dir if it doesn't exist already
+ dirname = os.path.dirname(host_path)
+ if dirname and not os.path.exists(dirname):
+ os.makedirs(dirname)
+ self.adb.Pull(device_path, host_path)
@decorators.WithTimeoutAndRetriesFromInstance()
def ReadFile(self, device_path, as_root=False, timeout=None, retries=None):
« no previous file with comments | « build/android/pylib/device/adb_wrapper.py ('k') | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698