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

Side by Side Diff: third_party/recipe_engine/field_composer.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
« no previous file with comments | « third_party/recipe_engine/expect_tests/util.py ('k') | third_party/recipe_engine/lint_test.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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013-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 5
6 class FieldComposerError(BaseException): 6 class FieldComposerError(BaseException):
7 """Base error class for this module.""" 7 """Base error class for this module."""
8 pass 8 pass
9 9
10 10
11 class RegistryConflict(FieldComposerError): 11 class RegistryConflict(FieldComposerError):
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 return FieldComposer(new_fields, new_registry) 77 return FieldComposer(new_fields, new_registry)
78 78
79 def get_with_context(self, key, value): 79 def get_with_context(self, key, value):
80 """Combine the current value for key (if any) with value.""" 80 """Combine the current value for key (if any) with value."""
81 if key not in self._registry: 81 if key not in self._registry:
82 raise CompositionUndefined( 82 raise CompositionUndefined(
83 "No combine function registered for %s." % key) 83 "No combine function registered for %s." % key)
84 if key in self: 84 if key in self:
85 return self._registry[key]['combine'](self.get(key), value) 85 return self._registry[key]['combine'](self.get(key), value)
86 return value 86 return value
OLDNEW
« no previous file with comments | « third_party/recipe_engine/expect_tests/util.py ('k') | third_party/recipe_engine/lint_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698