mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix more funcion => function typos
This commit is contained in:
parent
4badfa2bc2
commit
b1fb52a680
3 changed files with 6 additions and 6 deletions
|
@ -13774,7 +13774,7 @@ work on all hosts, but some functions require (for example) a service to be inst
|
|||
Instead of trying to wrap much of the code in large try/except blocks you can use
|
||||
a simple decorator to do this. If the dependencies passed to the decorator don\(aqt
|
||||
exist, then the salt minion will remove those functions from the module on that host.
|
||||
If a "fallback_funcion" is defined, it will replace the function instead of removing it
|
||||
If a "fallback_function" is defined, it will replace the function instead of removing it
|
||||
.INDENT 0.0
|
||||
.INDENT 3.5
|
||||
.sp
|
||||
|
@ -13800,7 +13800,7 @@ def _fallback():
|
|||
\(aq\(aq\(aq
|
||||
return \(aq"dependency_that_sometimes_exists" needs to be installed for this function to exist\(aq
|
||||
|
||||
@depends(\(aqdependency_that_sometimes_exists\(aq, fallback_funcion=_fallback)
|
||||
@depends(\(aqdependency_that_sometimes_exists\(aq, fallback_function=_fallback)
|
||||
def foo():
|
||||
\(aq\(aq\(aq
|
||||
Function with a dependency on the "dependency_that_sometimes_exists" module.
|
||||
|
|
|
@ -279,7 +279,7 @@ work on all hosts, but some functions require (for example) a service to be inst
|
|||
Instead of trying to wrap much of the code in large try/except blocks you can use
|
||||
a simple decorator to do this. If the dependencies passed to the decorator don't
|
||||
exist, then the salt minion will remove those functions from the module on that host.
|
||||
If a "fallback_funcion" is defined, it will replace the function instead of removing it
|
||||
If a "fallback_function" is defined, it will replace the function instead of removing it
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
@ -303,7 +303,7 @@ If a "fallback_funcion" is defined, it will replace the function instead of remo
|
|||
'''
|
||||
return '"dependency_that_sometimes_exists" needs to be installed for this function to exist'
|
||||
|
||||
@depends('dependency_that_sometimes_exists', fallback_funcion=_fallback)
|
||||
@depends('dependency_that_sometimes_exists', fallback_function=_fallback)
|
||||
def foo():
|
||||
'''
|
||||
Function with a dependency on the "dependency_that_sometimes_exists" module.
|
||||
|
|
|
@ -21,13 +21,13 @@ def depends():
|
|||
def missing_depends():
|
||||
return True
|
||||
|
||||
@salt.utils.decorators.depends('time', fallback_funcion=_fallbackfunc)
|
||||
@salt.utils.decorators.depends('time', fallback_function=_fallbackfunc)
|
||||
def depends_will_fallback():
|
||||
ret = {'ret': True,
|
||||
'time': time.time()}
|
||||
return ret
|
||||
|
||||
@salt.utils.decorators.depends('time123', fallback_funcion=_fallbackfunc)
|
||||
@salt.utils.decorators.depends('time123', fallback_function=_fallbackfunc)
|
||||
def missing_depends_will_fallback():
|
||||
ret = {'ret': True,
|
||||
'time': time.time()}
|
||||
|
|
Loading…
Add table
Reference in a new issue