Included reference to the included files in Config
This commit is contained in:
parent
8573d9d7f1
commit
725b3dd672
1 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,7 @@ class Config(object):
|
||||||
}
|
}
|
||||||
|
|
||||||
_workdir_location = os.path.join(os.environ['HOME'], '.local', 'share', 'platypush')
|
_workdir_location = os.path.join(os.environ['HOME'], '.local', 'share', 'platypush')
|
||||||
|
_included_files = set()
|
||||||
|
|
||||||
def __init__(self, cfgfile=None):
|
def __init__(self, cfgfile=None):
|
||||||
"""
|
"""
|
||||||
|
@ -134,6 +135,7 @@ class Config(object):
|
||||||
for include_file in include_files:
|
for include_file in include_files:
|
||||||
if not os.path.isabs(include_file):
|
if not os.path.isabs(include_file):
|
||||||
include_file = os.path.join(cfgfile_dir, include_file)
|
include_file = os.path.join(cfgfile_dir, include_file)
|
||||||
|
self._included_files.add(os.path.abspath(include_file))
|
||||||
|
|
||||||
included_config = self._read_config_file(include_file)
|
included_config = self._read_config_file(include_file)
|
||||||
for incl_section in included_config.keys():
|
for incl_section in included_config.keys():
|
||||||
|
|
Loading…
Reference in a new issue