mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-10 13:19:17 +00:00
fix bugs for #165
This commit is contained in:
@@ -482,9 +482,9 @@ class CfgYaml:
|
|||||||
this_profile = self.profiles[profile]
|
this_profile = self.profiles[profile]
|
||||||
|
|
||||||
# include
|
# include
|
||||||
dotfiles = this_profile.get(self.key_profile_dotfiles, [])
|
dotfiles = this_profile.get(self.key_profile_dotfiles, []) or []
|
||||||
actions = this_profile.get(self.key_profile_actions, [])
|
actions = this_profile.get(self.key_profile_actions, []) or []
|
||||||
includes = this_profile.get(self.key_profile_include, None)
|
includes = this_profile.get(self.key_profile_include, []) or []
|
||||||
if not includes:
|
if not includes:
|
||||||
# nothing to include
|
# nothing to include
|
||||||
return dotfiles, actions
|
return dotfiles, actions
|
||||||
@@ -658,7 +658,7 @@ class CfgYaml:
|
|||||||
"""add an existing dotfile key to a profile_key"""
|
"""add an existing dotfile key to a profile_key"""
|
||||||
self._new_profile(profile_key)
|
self._new_profile(profile_key)
|
||||||
profile = self.yaml_dict[self.key_profiles][profile_key]
|
profile = self.yaml_dict[self.key_profiles][profile_key]
|
||||||
pdfs = profile[self.key_profile_dotfiles]
|
pdfs = profile.get(self.key_profile_dotfiles, [])
|
||||||
if self.key_all not in pdfs and \
|
if self.key_all not in pdfs and \
|
||||||
dotfile_key not in pdfs:
|
dotfile_key not in pdfs:
|
||||||
profile[self.key_profile_dotfiles].append(dotfile_key)
|
profile[self.key_profile_dotfiles].append(dotfile_key)
|
||||||
|
|||||||
Reference in New Issue
Block a user