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

Side by Side Diff: scripts/slave/recipe_modules/python/api.py

Issue 17635005: Make blink_trybot recipe work on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Fix presubmit + move polyfill (retry) Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from slave import recipe_api
6
7 class PythonApi(recipe_api.RecipeApi):
8 def __call__(self, name, script, args=None, unbuffered=True, **kwargs):
9 """Return a step to run a python script with arguments."""
10 cmd = ['python']
11 if unbuffered:
12 cmd.append('-u')
13 cmd.append(script)
14 return self.m.step(name, cmd + list(args or []), **kwargs)
15
16 def inline(self, name, program, **kwargs):
17 """Run an inline python program as a step.
18
19 Program is output to a temp file and run when this step executes.
20 """
21 return self(name, recipe_api.InputDataPlaceholder(program, '.py'), **kwargs)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698