From e681235ea5f3911dd7ca3a0feba6cd639a5c2ead Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Wed, 20 Nov 2019 14:18:40 +0100 Subject: [PATCH] fix bugs for #165 --- dotdrop/cfg_yaml.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dotdrop/cfg_yaml.py b/dotdrop/cfg_yaml.py index be1b72f..75731ed 100644 --- a/dotdrop/cfg_yaml.py +++ b/dotdrop/cfg_yaml.py @@ -658,7 +658,9 @@ class CfgYaml: """add an existing dotfile key to a profile_key""" self._new_profile(profile_key) profile = self.yaml_dict[self.key_profiles][profile_key] - pdfs = profile.get(self.key_profile_dotfiles, []) + if self.key_profile_dotfiles not in profile: + profile[self.key_profile_dotfiles] = [] + pdfs = profile[self.key_profile_dotfiles] if self.key_all not in pdfs and \ dotfile_key not in pdfs: profile[self.key_profile_dotfiles].append(dotfile_key)