From 06203cfb94e0078ed4d19c1ec11ebc0d66561048 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Thu, 7 Feb 2019 21:14:14 +0100 Subject: [PATCH] remove legacy checks for dotfiles under profile --- dotdrop/config.py | 13 ------------- tests/test_install.py | 3 ++- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/dotdrop/config.py b/dotdrop/config.py index 66dcc1f..24f0eb3 100644 --- a/dotdrop/config.py +++ b/dotdrop/config.py @@ -153,19 +153,6 @@ class Cfg: if self.key_dotfiles not in self.content: self.log.err('missing \"{}\" in config'.format(self.key_dotfiles)) return False - if self.content[self.key_profiles]: - # make sure dotfiles are in a sub called "dotfiles" - # and adapt if there are not - profiles = self.content[self.key_profiles] - changed = False - for k in profiles.keys(): - if self.key_profiles_dots not in profiles[k] and \ - self.key_profiles_incl not in profiles[k]: - profiles[k] = {self.key_profiles_dots: profiles[k]} - changed = True - if changed: - # save the new config file - self._save(self.content, self.cfgpath) return True def _parse(self): diff --git a/tests/test_install.py b/tests/test_install.py index 4762a9c..fb0b942 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -68,8 +68,9 @@ exec bspwm f.write(' trans: {}\n'.format(d.trans_r.key)) f.write('profiles:\n') f.write(' {}:\n'.format(profile)) + f.write(' dotfiles:\n') for d in dotfiles: - f.write(' - {}\n'.format(d.key)) + f.write(' - {}\n'.format(d.key)) return path def test_install(self):