Pop path from self.loaded on exception

This commit is contained in:
ZyX 2013-04-10 20:04:22 +04:00
parent f389c43e43
commit 201175d368
1 changed files with 4 additions and 0 deletions

View File

@ -144,6 +144,10 @@ class ConfigLoader(MultiRunnedThread):
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
def run(self):
while self.interval is not None and not self.shutdown_event.is_set():