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

Unified Diff: recipe_modules/shutil/api.py

Issue 2146523003: shutil recipe_module: port chromium_utils rmtree implementation. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: nit Created 4 years, 5 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 | recipe_modules/shutil/example.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/shutil/api.py
diff --git a/recipe_modules/shutil/api.py b/recipe_modules/shutil/api.py
index 05814de34fa8bdf527376f0abdd866f3becc2a20..8b601acd1cd666794d85145fa1e05564225ffb5f 100644
--- a/recipe_modules/shutil/api.py
+++ b/recipe_modules/shutil/api.py
@@ -7,6 +7,14 @@ from recipe_engine import recipe_api
class ShutilApi(recipe_api.RecipeApi):
def rmtree(self, path, **kwargs):
name = kwargs.pop('name', 'rmtree %s' % path)
+ if kwargs.pop('flag_smart_rmtree', False):
+ # TODO(tandrii): remove this flag and makes this the only implementation.
+ self.m.python(
+ name,
+ self.resource('rmtree.py'),
+ args=[path],
+ **kwargs)
+ return
self.m.python.inline(
name,
"""
« no previous file with comments | « no previous file | recipe_modules/shutil/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698