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

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

Issue 1297903004: Fix `device.PushChangedFiles(delete_device_stale=True)` when no device files currently exist (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-managed-2
Patch Set: rebased Created 5 years, 4 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 | no next file » | 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 bc1f2ab27339c25b18d03ccac517649c15017c55..1e2ff8728742a68720e7e069b2ce0c5323c46249 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -1013,14 +1013,12 @@ class DeviceUtils(object):
all_changed_files += changed_files
all_stale_files += stale_files
- if delete_device_stale:
+ if delete_device_stale and all_stale_files:
self.RunShellCommand(['rm', '-f'] + all_stale_files,
check_return=True)
- if not all_changed_files:
- return
-
- self._PushFilesImpl(host_device_tuples, all_changed_files)
+ if all_changed_files:
+ self._PushFilesImpl(host_device_tuples, all_changed_files)
def _GetChangedAndStaleFiles(self, host_path, device_path, track_stale=False):
"""Get files to push and delete
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698