From 76bc5f132faeccdff2fda04d5c43baf05880733c Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Thu, 1 Sep 2022 21:34:07 +0200 Subject: [PATCH] refactoring --- dotdrop/options.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dotdrop/options.py b/dotdrop/options.py index 31e936c..9c8f78d 100644 --- a/dotdrop/options.py +++ b/dotdrop/options.py @@ -154,6 +154,7 @@ class Options(AttrMonitor): if ENV_NODEBUG in os.environ: # force disabling debugs self.debug = False + # selected profile self.profile = self.args['--profile'] self.confpath = self._get_config_path() if not self.confpath: @@ -393,11 +394,11 @@ class Options(AttrMonitor): def _fill_attr(self): """create attributes from conf""" - # variables + # defined variables self.variables = self.conf.get_variables() - # the dotfiles - self.dotfiles = self.conf.get_dotfiles() - # the profiles + # dotfiles for this profile + self.dotfiles = self.conf.get_dotfiles(profile_key=self.profile) + # all defined profiles self.profiles = self.conf.get_profiles() def _debug_attr(self):