1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 18:34:48 +00:00

fix bug for #168

This commit is contained in:
deadc0de6
2019-06-19 19:36:44 +02:00
parent 38a9366a71
commit eb9cae54da
2 changed files with 13 additions and 3 deletions

View File

@@ -410,8 +410,13 @@ class CfgYaml:
seen.append(inherited_profile)
new = self._get_included_variables(inherited_profile,
seen)
if self.debug:
msg = 'included vars from {}: {}'
self.log.dbg(msg.format(inherited_profile, new))
variables.update(new)
return pentry.get(self.key_profile_variables, {})
cur = pentry.get(self.key_profile_variables, {})
return self._merge_dict(variables, cur)
def _get_included_dvariables(self, profile, seen):
"""return included dynvariables"""
@@ -429,8 +434,13 @@ class CfgYaml:
raise YamlException('\"include loop\"')
seen.append(inherited_profile)
new = self._get_included_dvariables(inherited_profile, seen)
if self.debug:
msg = 'included dvars from {}: {}'
self.log.dbg(msg.format(inherited_profile, new))
variables.update(new)
return pentry.get(self.key_profile_dvariables, {})
cur = pentry.get(self.key_profile_dvariables, {})
return self._merge_dict(variables, cur)
def _resolve_profile_all(self):
"""resolve some other parts of the config"""

View File

@@ -101,7 +101,7 @@ grep '^another test' ${tmpd}/abc >/dev/null
cd ${ddpath} | ${bin} install -f -c ${cfg} -p p2
cat ${tmpd}/abc
grep '^this is some test' ${tmpd}/abc >/dev/null
grep '^this is some sub-test' ${tmpd}/abc >/dev/null
grep '^42' ${tmpd}/abc >/dev/null
grep '^another test' ${tmpd}/abc >/dev/null