mirror of
https://github.com/powerline/powerline.git
synced 2025-07-26 23:35:04 +02:00
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…
x
Reference in New Issue
Block a user