From 330a6eeeaafa93431cb5467cc8a954791c1a7858 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Mon, 2 Nov 2020 14:26:28 +0100 Subject: [PATCH] fix bug #280 --- dotdrop/cfg_yaml.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dotdrop/cfg_yaml.py b/dotdrop/cfg_yaml.py index e9e30ef..adcd8d0 100644 --- a/dotdrop/cfg_yaml.py +++ b/dotdrop/cfg_yaml.py @@ -351,6 +351,8 @@ class CfgYaml: def del_dotfile_from_profile(self, df_key, pro_key): """remove this dotfile from that profile""" + if self._debug: + self._dbg('removing \"{}\" from \"{}\"'.format(df_key, pro_key)) if df_key not in self.dotfiles.keys(): self._log.err('key not in dotfiles: {}'.format(df_key)) return False @@ -359,6 +361,9 @@ class CfgYaml: return False # get the profile dictionary profile = self._yaml_dict[self.key_profiles][pro_key] + if self.key_profile_dotfiles not in profile: + # profile does not contain any dotfiles + return True if df_key not in profile[self.key_profile_dotfiles]: return True if self._debug: