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

Unified Diff: recipe_engine/config.py

Issue 1344583003: Recipe package system. (Closed) Base URL: git@github.com:luci/recipes-py.git@master
Patch Set: Recompiled proto Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra/config/recipes.cfg ('k') | recipe_engine/config_types.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/config.py
diff --git a/recipe_engine/config.py b/recipe_engine/config.py
index 693b129670fe34442fbcb407598320b61c84d4e4..8191f1d55bafbd77bd33b34798daee0ee036096f 100644
--- a/recipe_engine/config.py
+++ b/recipe_engine/config.py
@@ -68,12 +68,11 @@ modular configurations. See the documentation on config_item_context and the
BaseConfig derivatives for more info.
"""
+from __future__ import absolute_import
import collections
import functools
import types
-from infra.libs import infra_types
-
class BadConf(Exception):
pass
@@ -374,9 +373,7 @@ class ConfigGroup(ConfigBase):
def set_val(self, val):
if isinstance(val, ConfigBase):
val = val.as_jsonish(include_hidden=True)
- if isinstance(val, infra_types.FrozenDict):
- val = infra_types.thaw(val)
- typeAssert(val, dict)
+ typeAssert(val, collections.Mapping)
val = dict(val) # because we pop later.
for name, config_obj in self._type_map.iteritems():
@@ -522,10 +519,7 @@ class Dict(ConfigBase, collections.MutableMapping):
def set_val(self, val):
if isinstance(val, Dict):
val = val.data
- if isinstance(val, infra_types.FrozenDict):
- val = dict(val)
-
- typeAssert(val, dict)
+ typeAssert(val, collections.Mapping)
for v in val.itervalues():
typeAssert(v, self.value_type)
self.data = val
« no previous file with comments | « infra/config/recipes.cfg ('k') | recipe_engine/config_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698