Merge branch 'fix-reloading' into develop

This commit is contained in:
ZyX 2014-08-23 19:09:42 +04:00
commit d76df9f168
2 changed files with 4 additions and 2 deletions

View File

@ -15,7 +15,9 @@ from threading import Lock, Event
def _config_loader_condition(path):
return path and os.path.isfile(path)
if path and os.path.isfile(path):
return path
return None
def _find_config_files(search_paths, config_file, config_loader=None, loader_callback=None):

View File

@ -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: