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

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 one of the docstrings Created 4 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
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 fbaa7ec4f763fed134c0678920ffe2dec56dedd4..a6980b6c3baadfdeaa72a8fc0acadefbff67e754 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):
jbudorick 2016/05/04 18:10:43 Huh, I was looking for this yesterday.
+ """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