diff --git a/recipes/recipe_modules/gitiles/api.py b/recipes/recipe_modules/gitiles/api.py index 067fc5b123..592ea06cb1 100644 --- a/recipes/recipe_modules/gitiles/api.py +++ b/recipes/recipe_modules/gitiles/api.py @@ -57,8 +57,8 @@ class Gitiles(recipe_api.RecipeApi): args.extend([ '--accept-statuses', ','.join([str(s) for s in accept_statuses])]) - return self.m.python( - step_name, self.resource('gerrit_client.py'), args, **kwargs) + cmd = ['python3', '-u', self.resource('gerrit_client.py')] + args + return self.m.step(step_name, cmd, **kwargs) def refs(self, url, step_name='refs', attempts=None): """Returns a list of refs in the remote repository.""" diff --git a/recipes/recipe_modules/gitiles/examples/full.expected/basic.json b/recipes/recipe_modules/gitiles/examples/full.expected/basic.json index 6caa1ff29e..a9fbd069af 100644 --- a/recipes/recipe_modules/gitiles/examples/full.expected/basic.json +++ b/recipes/recipe_modules/gitiles/examples/full.expected/basic.json @@ -1,7 +1,7 @@ [ { "cmd": [ - "python", + "python3", "-u", "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py", "--json-file", @@ -27,7 +27,7 @@ }, { "cmd": [ - "python", + "python3", "-u", "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py", "--json-file", @@ -136,7 +136,7 @@ }, { "cmd": [ - "python", + "python3", "-u", "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py", "--json-file", @@ -246,7 +246,7 @@ }, { "cmd": [ - "python", + "python3", "-u", "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py", "--json-file", @@ -354,7 +354,7 @@ }, { "cmd": [ - "python", + "python3", "-u", "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py", "--json-file", @@ -462,7 +462,7 @@ }, { "cmd": [ - "python", + "python3", "-u", "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py", "--json-file", @@ -515,7 +515,7 @@ }, { "cmd": [ - "python", + "python3", "-u", "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py", "--json-file", @@ -531,7 +531,7 @@ }, { "cmd": [ - "python", + "python3", "-u", "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py", "--json-file", @@ -549,7 +549,7 @@ }, { "cmd": [ - "python", + "python3", "-u", "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py", "--json-file", @@ -568,7 +568,7 @@ }, { "cmd": [ - "python", + "python3", "-u", "RECIPE_MODULE[depot_tools::gitiles]/resources/gerrit_client.py", "--json-file", diff --git a/recipes/recipe_modules/gitiles/resources/gerrit_client.py b/recipes/recipe_modules/gitiles/resources/gerrit_client.py index a4ad62e099..bdc68dce8e 100755 --- a/recipes/recipe_modules/gitiles/resources/gerrit_client.py +++ b/recipes/recipe_modules/gitiles/resources/gerrit_client.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.