forked from platypush/platypush
Include should occur only once in the file
This commit is contained in:
parent
7963b5e11f
commit
ed28a2c3ec
1 changed files with 7 additions and 3 deletions
|
@ -74,8 +74,12 @@ class Config(object):
|
|||
|
||||
for section in file_config:
|
||||
if section == 'include':
|
||||
included_config = self._read_config_file(file_config[section])
|
||||
include_files = file_config[section] \
|
||||
if isinstance(file_config[section], list) \
|
||||
else [file_config[section]]
|
||||
|
||||
for include_file in include_files:
|
||||
included_config = self._read_config_file(include_file)
|
||||
for incl_section in included_config.keys():
|
||||
config[incl_section] = included_config[incl_section]
|
||||
elif 'disabled' not in file_config[section] \
|
||||
|
|
Loading…
Reference in a new issue