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

Unified Diff: devil/devil/android/tools/provision_devices.py

Issue 2807983004: [devil] Don't attempt to remove nothing when removing system apps. (Closed)
Patch Set: Created 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/android/tools/provision_devices.py
diff --git a/devil/devil/android/tools/provision_devices.py b/devil/devil/android/tools/provision_devices.py
index a021463cdb37235d9a6c4a0386c5220f4bc4543a..0f49878e3f722899761abad03b9be554f946059e 100755
--- a/devil/devil/android/tools/provision_devices.py
+++ b/devil/devil/android/tools/provision_devices.py
@@ -358,10 +358,11 @@ def _RemoveSystemApp(device, system_app):
path = os.path.join(directory, system_app)
if device.PathExists(path):
found_paths.append(path)
- if not found_paths:
+ if found_paths:
+ device.RemovePath(found_paths, force=True, recursive=True)
+ else:
logger.warning('Could not find install location for system app %s',
system_app)
- device.RemovePath(found_paths, force=True, recursive=True)
def RemoveSystemApps(device, system_app_remove_list):
"""Attempts to remove the provided system apps from the given device.
« 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