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:
|
||||
self.loaded[path] = deepcopy(self._load(path))
|
||||
except Exception as e:
|
||||
self.exception('Error while loading {0}: {1}', path, str(e))
|
||||
try:
|
||||
self.loaded.pop(path)
|
||||
except KeyError:
|
||||
pass
|
||||
self.exception('Error while loading {0}: {1}', path, str(e))
|
||||
try:
|
||||
self.loaded.pop(path)
|
||||
except KeyError:
|
||||
|
|
Loading…
Reference in New Issue