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

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

Issue 1151423002: Move recipe engine to third_party/recipe_engine. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Moved field_composer_test with its buddies Created 5 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
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import cStringIO 5 import cStringIO
6 import csv 6 import csv
7 7
8 from slave import recipe_api 8 from recipe_engine import recipe_api
9 9
10 10
11 class OmahaproxyApi(recipe_api.RecipeApi): 11 class OmahaproxyApi(recipe_api.RecipeApi):
12 """APIs for interacting with omahaproxy.""" 12 """APIs for interacting with omahaproxy."""
13 13
14 @staticmethod 14 @staticmethod
15 def split_version(text): 15 def split_version(text):
16 result = [int(x) for x in text.split('.')] 16 result = [int(x) for x in text.split('.')]
17 assert len(result) == 4 17 assert len(result) == 4
18 return result 18 return result
(...skipping 13 matching lines...) Expand all
32 data = list(csv_reader) 32 data = list(csv_reader)
33 header = data[0] 33 header = data[0]
34 for row in data[1:]: 34 for row in data[1:]:
35 candidate = {header[i]: row[i] for i in range(len(row))} 35 candidate = {header[i]: row[i] for i in range(len(row))}
36 if (min_major_version and 36 if (min_major_version and
37 self.split_version(candidate['version'])[0] < min_major_version): 37 self.split_version(candidate['version'])[0] < min_major_version):
38 continue 38 continue
39 if row[0].strip() in exclude_platforms: 39 if row[0].strip() in exclude_platforms:
40 continue 40 continue
41 yield candidate 41 yield candidate
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/math_utils/api.py ('k') | scripts/slave/recipe_modules/path/api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698