1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-06 17:47:59 +00:00

Adding parsing of variables in profile actions

This commit is contained in:
Davide Laezza
2019-06-17 10:48:51 +02:00
parent 56b2eebfcd
commit 49fd345da7
2 changed files with 134 additions and 0 deletions

View File

@@ -244,6 +244,21 @@ class CfgYaml:
self.log.dbg('resolved: {}'.format(new))
v[self.key_dotfile_actions] = new
# profile entries
try:
this_profile = self.profiles[self.profile]
# actions
this_profile[self.key_profile_actions] = [
t.generate_string(a)
for a in this_profile.get(self.key_profile_actions, [])
]
this_profile_actions = this_profile[self.key_profile_actions]
if this_profile_actions and self.debug:
self.log.dbg('resolved: {}'.format(this_profile_actions))
except KeyError:
# self.profile is not in the YAML file
pass
# external actions paths
new = []
for p in self.settings.get(self.key_import_actions, []):