Commit 30961cdc authored by Xavier Thompson's avatar Xavier Thompson

[tmp]: Fix += and -= in the same file

parent 5ac7940a
......@@ -2127,8 +2127,6 @@ class _extends(object):
result = {}
for d in self.extends:
_update(result, d)
# Hack: Update with itself to process += in the same file
_update(result, result)
return result
def __getattr__(self, attr):
......@@ -2313,7 +2311,10 @@ def _update(d1, d2):
if section in d1:
_update_section(d1[section], d2[section])
else:
d1[section] = d2[section]
# In order to process += (and -=) correctly when
# <key> = <value> and <key> += <value> are in the same section
# _update_section must be called even when section is not in d1
d1[section] = _update_section({}, d2[section])
return d1
def _recipe(options):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment