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): ...@@ -2127,8 +2127,6 @@ class _extends(object):
result = {} result = {}
for d in self.extends: for d in self.extends:
_update(result, d) _update(result, d)
# Hack: Update with itself to process += in the same file
_update(result, result)
return result return result
def __getattr__(self, attr): def __getattr__(self, attr):
...@@ -2313,7 +2311,10 @@ def _update(d1, d2): ...@@ -2313,7 +2311,10 @@ def _update(d1, d2):
if section in d1: if section in d1:
_update_section(d1[section], d2[section]) _update_section(d1[section], d2[section])
else: 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 return d1
def _recipe(options): 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