Extract the config provider into its own sub-module

This commit is contained in:
Joseph Schorr 2015-07-24 14:52:19 -04:00
parent 15963fe18c
commit 88a04441de
10 changed files with 230 additions and 212 deletions

View 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)