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

Side by Side Diff: fetch_configs/config_util.py

Issue 1494793002: Rename recipes/ to fetch_configs/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Renamed recipes to configs Created 5 years 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
« no previous file with comments | « fetch_configs/chromium.py ('k') | fetch_configs/crashpad.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 """This module holds utilities which make writing recipes easier.""" 5 """This module holds utilities which make writing configs easier."""
6 6
7 import json 7 import json
8 8
9 9
10 class Recipe(object): 10 class Config(object):
11 """Base class for all recipes. 11 """Base class for all configs.
12 12
13 Provides methods that are expected to be overridden by child classes. Also 13 Provides methods that are expected to be overridden by child classes. Also
14 provides an command-line parsing method that converts the unified command-line 14 provides an command-line parsing method that converts the unified command-line
15 interface used in depot_tools to the unified python interface defined here.""" 15 interface used in depot_tools to the unified python interface defined here."""
16 16
17 @staticmethod 17 @staticmethod
18 def fetch_spec(_props): 18 def fetch_spec(_props):
19 """Returns instructions to check out the project, conditioned on |props|.""" 19 """Returns instructions to check out the project, conditioned on |props|."""
20 raise NotImplementedError 20 raise NotImplementedError
21 21
(...skipping 19 matching lines...) Expand all
41 return 1 41 return 1
42 42
43 method = methods[argv[1]] 43 method = methods[argv[1]]
44 props = dict(x.split('=', 1) for x in (y.lstrip('-') for y in argv[2:])) 44 props = dict(x.split('=', 1) for x in (y.lstrip('-') for y in argv[2:]))
45 45
46 self.output(method(props)) 46 self.output(method(props))
47 47
48 @staticmethod 48 @staticmethod
49 def output(data): 49 def output(data):
50 print(json.dumps(data)) 50 print(json.dumps(data))
OLDNEW
« no previous file with comments | « fetch_configs/chromium.py ('k') | fetch_configs/crashpad.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698