Commit d38a2da9 authored by Sergiy Byelozyorov's avatar Sergiy Byelozyorov Committed by Commit Bot

Use cwd from context instead of kwargs

It is not possible to use cwd argument, since none of the methods called by this
module define cwd explicitly and low-level modules like api.step do not support
it anymore, resulting in a TypeError exception thrown due to unexpected keyword
argument, e.g. see https://ci.chromium.org/swarming/task/3e74a52905a71110. Given
that any users using cwd argument would be broken anyway, it should be safe to
make this change.

Planned usage: https://crrev.com/c/1122874

R=tandrii@chromium.org, iannucci@chromium.org

Bug: 793687
Change-Id: Iadf6bf91d8d41dbc6751a848bb69d7922a206ade
Reviewed-on: https://chromium-review.googlesource.com/1122873Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
parent 621c9d28
......@@ -254,7 +254,7 @@ class GclientApi(recipe_api.RecipeApi):
name = 'recurse (git config %s)' % var
self(name, ['recurse', 'git', 'config', var, val], **kwargs)
finally:
cwd = kwargs.get('cwd', self.m.path['start_dir'])
cwd = self.m.context.cwd or self.m.path['start_dir']
if 'checkout' not in self.m.path:
self.m.path['checkout'] = cwd.join(
*cfg.solutions[0].name.split(self.m.path.sep))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment