1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-07 22:39:17 +00:00

fix dynamic variables in include for #93

This commit is contained in:
deadc0de6
2019-03-03 13:55:21 +01:00
parent 5cd2616b17
commit b592fc8448
2 changed files with 12 additions and 9 deletions

View File

@@ -181,6 +181,15 @@ class Cfg:
def _parse(self):
"""parse config file"""
# parse the settings
self.lnk_settings = self.content[self.key_settings]
self._complete_settings()
# load external variables/dynvariables
if self.key_include_vars in self.lnk_settings:
paths = self.lnk_settings[self.key_include_vars]
self._load_ext_variables(paths)
# parse all actions
if self.key_actions in self.content:
if self.content[self.key_actions] is not None:
@@ -226,10 +235,6 @@ class Cfg:
# ensures it's an empty list
v[self.key_profiles_dots] = []
# parse the settings
self.lnk_settings = self.content[self.key_settings]
self._complete_settings()
# parse the dotfiles
# and construct the dict of objects per dotfile key
if not self.content[self.key_dotfiles]:
@@ -367,11 +372,6 @@ class Cfg:
self.lnk_settings[self.key_workdir] = \
self._abs_path(self.curworkdir)
# load external variables/dynvariables
if self.key_include_vars in self.lnk_settings:
paths = self.lnk_settings[self.key_include_vars]
self._load_ext_variables(paths)
return True
def _load_ext_variables(self, paths):