mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix and clarify docstring.
This commit is contained in:
parent
c2c47e4e71
commit
aad668d559
1 changed files with 6 additions and 2 deletions
|
@ -101,8 +101,12 @@ def _set_retcode(ret, highstate=None):
|
|||
|
||||
def _get_pillar_errors(kwargs, pillar=None):
|
||||
'''
|
||||
Check the pillar for errors, refuse to run the state if there are errors
|
||||
in the pillar and return the pillar errors
|
||||
Checks all pillars (external and internal) for errors.
|
||||
Return an error message, if anywhere or None.
|
||||
|
||||
:param kwargs: dictionary of options
|
||||
:param pillar: external pillar
|
||||
:return: None or an error message
|
||||
'''
|
||||
return None if kwargs.get('force') else (pillar or {}).get('_errors', __pillar__.get('_errors')) or None
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue