mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 14:31:46 +00:00
refactoring
This commit is contained in:
@@ -17,7 +17,7 @@ from docopt import docopt
|
||||
from dotdrop.version import __version__ as VERSION
|
||||
from dotdrop.linktypes import LinkTypes
|
||||
from dotdrop.logger import Logger
|
||||
from dotdrop.cfg_aggregator import CfgAggregator as Cfg
|
||||
from dotdrop.cfg_aggregator import CfgAggregator
|
||||
from dotdrop.action import Action
|
||||
from dotdrop.utils import uniq_list, debug_list, debug_dict
|
||||
from dotdrop.exceptions import YamlException
|
||||
@@ -253,8 +253,10 @@ class Options(AttrMonitor):
|
||||
|
||||
def _read_config(self):
|
||||
"""read the config file"""
|
||||
self.conf = Cfg(self.confpath, self.profile, debug=self.debug,
|
||||
dry=self.dry)
|
||||
self.conf = CfgAggregator(self.confpath,
|
||||
self.profile,
|
||||
debug=self.debug,
|
||||
dry=self.dry)
|
||||
# transform the config settings to self attribute
|
||||
settings = self.conf.get_settings()
|
||||
debug_dict('effective settings', settings, self.debug)
|
||||
|
||||
@@ -7,7 +7,7 @@ basic unittest for jhelpers
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from dotdrop.cfg_aggregator import CfgAggregator as Cfg
|
||||
from dotdrop.cfg_aggregator import CfgAggregator
|
||||
from tests.helpers import (clean,
|
||||
create_random_file, get_string, get_tempdir,
|
||||
load_options)
|
||||
@@ -97,7 +97,7 @@ dirname: /tmp/a/b
|
||||
profile = get_string(5)
|
||||
confpath = os.path.join(tmp, self.CONFIG_NAME)
|
||||
self.fake_config(confpath, d1, profile, tmp)
|
||||
conf = Cfg(confpath, profile, debug=True)
|
||||
conf = CfgAggregator(confpath, profile, debug=True)
|
||||
self.assertTrue(conf is not None)
|
||||
|
||||
# install them
|
||||
|
||||
Reference in New Issue
Block a user