aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules/core
diff options
context:
space:
mode:
authorGravatar Robert Iannucci <iannucci@google.com>2017-05-12 19:09:38 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-15 13:46:22 +0000
commit297a7efd54495a06a7473eb8d99b211fd511766c (patch)
tree44b09641b37f75abe50d849a1082b6d9b6c6a459 /infra/bots/recipe_modules/core
parent9018952290a468886c819405c6d9495b4aa5d7d4 (diff)
[skia] convert recipes and module to new context module
This is a syntax-only change to convert to the new (documented) context module. R=borenet@google.com Bug: skia: Change-Id: Id907c309d3cf38b85a46f6d8d7ce90ed58ba026f Reviewed-on: https://skia-review.googlesource.com/16840 Commit-Queue: Eric Boren <borenet@google.com> Reviewed-by: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/core')
-rw-r--r--infra/bots/recipe_modules/core/__init__.py1
-rw-r--r--infra/bots/recipe_modules/core/api.py8
2 files changed, 5 insertions, 4 deletions
diff --git a/infra/bots/recipe_modules/core/__init__.py b/infra/bots/recipe_modules/core/__init__.py
index 9112c1c4f8..6b541c39aa 100644
--- a/infra/bots/recipe_modules/core/__init__.py
+++ b/infra/bots/recipe_modules/core/__init__.py
@@ -8,6 +8,7 @@ DEPS = [
'depot_tools/gclient',
'depot_tools/tryserver',
'flavor',
+ 'recipe_engine/context',
'recipe_engine/path',
'recipe_engine/properties',
'recipe_engine/python',
diff --git a/infra/bots/recipe_modules/core/api.py b/infra/bots/recipe_modules/core/api.py
index 0a2cb4ef1d..747416468a 100644
--- a/infra/bots/recipe_modules/core/api.py
+++ b/infra/bots/recipe_modules/core/api.py
@@ -41,7 +41,7 @@ class SkiaApi(recipe_api.RecipeApi):
git = 'git.bat'
else:
git = 'git'
- with self.m.step.context({'cwd': repo_path}):
+ with self.m.context(cwd=repo_path):
self.m.step('git remote set-url',
cmd=[git, 'remote', 'set-url', 'origin', repo.url],
infra_step=True)
@@ -159,13 +159,13 @@ class SkiaApi(recipe_api.RecipeApi):
self.m.bot_update._repository = patch_repo
self.m.gclient.c = gclient_cfg
- with self.m.step.context({'cwd': self.m.vars.checkout_root}):
+ with self.m.context(cwd=self.m.vars.checkout_root):
update_step = self.m.bot_update.ensure_checkout(patch_root=patch_root)
self.m.vars.got_revision = (
update_step.presentation.properties['got_revision'])
if self.m.vars.need_chromium_checkout:
- with self.m.step.context({'cwd': self.m.vars.checkout_root,
- 'env': self.m.vars.gclient_env}):
+ with self.m.context(cwd=self.m.vars.checkout_root,
+ env=self.m.vars.gclient_env):
self.m.gclient.runhooks()