From 201175d368f8fe4ddd1a3dae1ab22e929aad9331 Mon Sep 17 00:00:00 2001 From: ZyX Date: Wed, 10 Apr 2013 20:04:22 +0400 Subject: [PATCH] Pop path from self.loaded on exception --- powerline/lib/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/powerline/lib/config.py b/powerline/lib/config.py index 8fec4d95..3b8ce5a4 100644 --- a/powerline/lib/config.py +++ b/powerline/lib/config.py @@ -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():