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

Unified Diff: recipe_engine/config.py

Issue 2816083003: config: fix config.Dict with no value type (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | 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 dd473a1cf78a16b8f29a0d89944330da4d131000..e0048adba924c3108db4e55ff7a33b0c4e9c5f00 100644
--- a/recipe_engine/config.py
+++ b/recipe_engine/config.py
@@ -620,8 +620,9 @@ class Dict(ConfigBase, collections.MutableMapping):
if isinstance(val, Dict):
val = val.data
typeAssert(val, collections.Mapping)
- for v in val.itervalues():
- typeAssert(v, self.value_type)
+ if self.value_type:
+ for v in val.itervalues():
+ typeAssert(v, self.value_type)
self.data = val
def as_jsonish(self, _include_hidden=None):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698