diff --git a/dotdrop/cfg_yaml.py b/dotdrop/cfg_yaml.py index af8eb78..c09992b 100644 --- a/dotdrop/cfg_yaml.py +++ b/dotdrop/cfg_yaml.py @@ -398,6 +398,9 @@ class CfgYaml: return profiles new = {} for k, v in profiles.items(): + if not v: + # no dotfiles + continue # add dotfiles entry if not present if self.key_profile_dotfiles not in v: v[self.key_profile_dotfiles] = [] diff --git a/dotdrop/dotdrop.py b/dotdrop/dotdrop.py index d9c0712..f499ae4 100644 --- a/dotdrop/dotdrop.py +++ b/dotdrop/dotdrop.py @@ -193,7 +193,7 @@ def cmd_install(o): def cmd_compare(o, tmp): """compare dotfiles and return True if all identical""" dotfiles = o.dotfiles - if dotfiles == []: + if not dotfiles: msg = 'no dotfile defined for this profile (\"{}\")' LOG.warn(msg.format(o.profile)) return True