mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-10 08:39:15 +00:00
fix bug for #168
This commit is contained in:
@@ -410,8 +410,13 @@ class CfgYaml:
|
|||||||
seen.append(inherited_profile)
|
seen.append(inherited_profile)
|
||||||
new = self._get_included_variables(inherited_profile,
|
new = self._get_included_variables(inherited_profile,
|
||||||
seen)
|
seen)
|
||||||
|
if self.debug:
|
||||||
|
msg = 'included vars from {}: {}'
|
||||||
|
self.log.dbg(msg.format(inherited_profile, new))
|
||||||
variables.update(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):
|
def _get_included_dvariables(self, profile, seen):
|
||||||
"""return included dynvariables"""
|
"""return included dynvariables"""
|
||||||
@@ -429,8 +434,13 @@ class CfgYaml:
|
|||||||
raise YamlException('\"include loop\"')
|
raise YamlException('\"include loop\"')
|
||||||
seen.append(inherited_profile)
|
seen.append(inherited_profile)
|
||||||
new = self._get_included_dvariables(inherited_profile, seen)
|
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)
|
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):
|
def _resolve_profile_all(self):
|
||||||
"""resolve some other parts of the config"""
|
"""resolve some other parts of the config"""
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ grep '^another test' ${tmpd}/abc >/dev/null
|
|||||||
cd ${ddpath} | ${bin} install -f -c ${cfg} -p p2
|
cd ${ddpath} | ${bin} install -f -c ${cfg} -p p2
|
||||||
|
|
||||||
cat ${tmpd}/abc
|
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 '^42' ${tmpd}/abc >/dev/null
|
||||||
grep '^another test' ${tmpd}/abc >/dev/null
|
grep '^another test' ${tmpd}/abc >/dev/null
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user