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

Unified Diff: scripts/slave/recipe_modules/file/api.py

Issue 1274723004: Converted Android Chromedriver buildbot scripts to recipes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Fixed nits. 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
Index: scripts/slave/recipe_modules/file/api.py
diff --git a/scripts/slave/recipe_modules/file/api.py b/scripts/slave/recipe_modules/file/api.py
index 22378e20c267d1c3b3c6d652fea880d97d78ce70..60ff2ead17c223ab68098eeb467cbaf2a3363e3e 100644
--- a/scripts/slave/recipe_modules/file/api.py
+++ b/scripts/slave/recipe_modules/file/api.py
@@ -40,6 +40,20 @@ class FileApi(recipe_api.RecipeApi):
**kwargs
)
+ def move(self, name, source, dest, **kwargs):
+ """Run shutil.move in a step."""
+ return self.m.python.inline(
+ name,
+ """
+ import shutil
+ import sys
+ shutil.move(sys.argv[1], sys.argv[2])
+ """,
+ args=[source, dest],
+ add_python_log=False,
+ **kwargs
+ )
+
def read(self, name, path, test_data=None, **kwargs):
"""Read a file and return its contents."""
step_test_data = None

Powered by Google App Engine
This is Rietveld 408576698