mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +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
1 changed files with 6 additions and 1 deletions
|
@ -1065,7 +1065,12 @@ class LazyLoader(salt.utils.lazy.LazyDict):
|
|||
self._apply_outputter(func, mod)
|
||||
|
||||
# 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
|
||||
return True
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue