Fixed an issue in #102

This commit is contained in:
Manuel Cortez 2017-11-20 03:14:30 -06:00
parent 9fd7c14e32
commit beb75ff6d1

View File

@ -9,8 +9,6 @@ log = getLogger("config_utils")
class ConfigLoadError(Exception): pass class ConfigLoadError(Exception): pass
def load_config(config_path, configspec_path=None, copy=True, *args, **kwargs): def load_config(config_path, configspec_path=None, copy=True, *args, **kwargs):
if os.path.exists(config_path):
clean_config(config_path)
spec = ConfigObj(configspec_path, encoding='UTF8', list_values=False, _inspec=True) spec = ConfigObj(configspec_path, encoding='UTF8', list_values=False, _inspec=True)
try: try:
config = ConfigObj(infile=config_path, configspec=spec, create_empty=True, encoding='UTF8', *args, **kwargs) config = ConfigObj(infile=config_path, configspec=spec, create_empty=True, encoding='UTF8', *args, **kwargs)