When processing exception from _load do not allow overwriting it
If `self.loaded.pop` raises KeyError then this KeyError will be logged, not the initial exception from `self._load`.
This commit is contained in:
parent
f6f8dd8af3
commit
483b261019
|
@ -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