Extract the config provider into its own sub-module
This commit is contained in:
parent
15963fe18c
commit
88a04441de
10 changed files with 230 additions and 212 deletions
10
util/config/provider/__init__.py
Normal file
10
util/config/provider/__init__.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from util.config.provider.fileprovider import FileConfigProvider
|
||||
from util.config.provider.testprovider import TestConfigProvider
|
||||
|
||||
def get_config_provider(config_volume, yaml_filename, py_filename, testing=False):
|
||||
""" Loads and returns the config provider for the current environment. """
|
||||
if testing:
|
||||
return TestConfigProvider()
|
||||
|
||||
return FileConfigProvider(config_volume, yaml_filename, py_filename)
|
||||
|
Reference in a new issue