mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-09 14:39:16 +00:00
fix bug #280
This commit is contained in:
@@ -351,6 +351,8 @@ class CfgYaml:
|
|||||||
|
|
||||||
def del_dotfile_from_profile(self, df_key, pro_key):
|
def del_dotfile_from_profile(self, df_key, pro_key):
|
||||||
"""remove this dotfile from that profile"""
|
"""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():
|
if df_key not in self.dotfiles.keys():
|
||||||
self._log.err('key not in dotfiles: {}'.format(df_key))
|
self._log.err('key not in dotfiles: {}'.format(df_key))
|
||||||
return False
|
return False
|
||||||
@@ -359,6 +361,9 @@ class CfgYaml:
|
|||||||
return False
|
return False
|
||||||
# get the profile dictionary
|
# get the profile dictionary
|
||||||
profile = self._yaml_dict[self.key_profiles][pro_key]
|
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]:
|
if df_key not in profile[self.key_profile_dotfiles]:
|
||||||
return True
|
return True
|
||||||
if self._debug:
|
if self._debug:
|
||||||
|
|||||||
Reference in New Issue
Block a user