mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Added exception handler to trap the RuntimeError raised when
Depends.enforce_dependency() class method fires unsuccessfully. There appears to be no synchronization within the Depends decorator class wrt the class global dependency_dict which results in incomplete population of any loader instantiation occuring at the time of one of these exceptions. This would mitigate the immediate affects of #23839 and #23373.
This commit is contained in:
parent
02a78fce3d
commit
197688ef0c
@ -1065,7 +1065,12 @@ class LazyLoader(salt.utils.lazy.LazyDict):
|
|||||||
self._apply_outputter(func, mod)
|
self._apply_outputter(func, mod)
|
||||||
|
|
||||||
# enforce depends
|
# enforce depends
|
||||||
Depends.enforce_dependencies(self._dict, self.tag)
|
try:
|
||||||
|
Depends.enforce_dependencies(self._dict, self.tag)
|
||||||
|
except RuntimeError as e:
|
||||||
|
log.info('Depends.enforce_dependencies() failed '
|
||||||
|
'for reasons: '.format(e))
|
||||||
|
|
||||||
self.loaded_modules[module_name] = mod_dict
|
self.loaded_modules[module_name] = mod_dict
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user