mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 01:46:15 +01:00
Rewrite ConfigSet._get_list_value_for_modification
This commit is contained in:
parent
d54622e341
commit
555507975d
@ -19,7 +19,7 @@ Download the project from our page on [waf.io](https://waf.io/) or from the mirr
|
||||
|
||||
## HOW TO CREATE THE WAF SCRIPT
|
||||
|
||||
Python >= 2.6 3.4 is required to generate the waf script, and the resulting file can then run on Python 2.5.
|
||||
Python >= 2.6 is required to generate the waf script, and the resulting file can then run on Python 2.5.
|
||||
Just execute:
|
||||
```sh
|
||||
$ ./waf-light configure build
|
||||
|
@ -191,16 +191,20 @@ class ConfigSet(object):
|
||||
try:
|
||||
value = self.table[key]
|
||||
except KeyError:
|
||||
try: value = self.parent[key]
|
||||
except AttributeError: value = []
|
||||
if isinstance(value, list):
|
||||
value = value[:]
|
||||
try:
|
||||
value = self.parent[key]
|
||||
except AttributeError:
|
||||
value = []
|
||||
else:
|
||||
value = [value]
|
||||
if isinstance(value, list):
|
||||
# force a copy
|
||||
value = value[:]
|
||||
else:
|
||||
value = [value]
|
||||
self.table[key] = value
|
||||
else:
|
||||
if not isinstance(value, list):
|
||||
value = [value]
|
||||
self.table[key] = value
|
||||
self.table[key] = value = [value]
|
||||
return value
|
||||
|
||||
def append_value(self, var, val):
|
||||
|
Loading…
Reference in New Issue
Block a user