Merge branch 'fix-reloading' into develop
This commit is contained in:
commit
d76df9f168
|
@ -15,7 +15,9 @@ from threading import Lock, Event
|
||||||
|
|
||||||
|
|
||||||
def _config_loader_condition(path):
|
def _config_loader_condition(path):
|
||||||
return path and os.path.isfile(path)
|
if path and os.path.isfile(path):
|
||||||
|
return path
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
def _find_config_files(search_paths, config_file, config_loader=None, loader_callback=None):
|
def _find_config_files(search_paths, config_file, config_loader=None, loader_callback=None):
|
||||||
|
|
|
@ -195,11 +195,11 @@ class ConfigLoader(MultiRunnedThread):
|
||||||
try:
|
try:
|
||||||
self.loaded[path] = deepcopy(self._load(path))
|
self.loaded[path] = deepcopy(self._load(path))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
self.exception('Error while loading {0}: {1}', path, str(e))
|
||||||
try:
|
try:
|
||||||
self.loaded.pop(path)
|
self.loaded.pop(path)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
self.exception('Error while loading {0}: {1}', path, str(e))
|
|
||||||
try:
|
try:
|
||||||
self.loaded.pop(path)
|
self.loaded.pop(path)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Loading…
Reference in New Issue