Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chainedconfigparser.py

Issue 29756621: Issue 6552 - call setdefault() on correct dictionary (Closed)
Patch Set: Created April 19, 2018, 12:23 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
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: chainedconfigparser.py
diff --git a/chainedconfigparser.py b/chainedconfigparser.py
index 610baf46debe0dbc9c2610b0040826ccf97ff410..bf34d1fdff0bce27c1ef15af5e8a6bb1c7549871 100644
--- a/chainedconfigparser.py
+++ b/chainedconfigparser.py
@@ -216,7 +216,7 @@ class ChainedConfigParser(ConfigParser.SafeConfigParser):
tail = parents.pop()
current = base
for name in parents:
- current = base.setdefault(name, {})
+ current = current.setdefault(name, {})
if '\n' in v:
current[tail] = [parse_value(x) for x in v.splitlines() if x]
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld