mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
parent
57b5b594bd
commit
03400ef45b
@ -279,13 +279,13 @@ the case when the dependency is unavailable.
|
|||||||
|
|
||||||
|
|
||||||
def __virtual__():
|
def __virtual__():
|
||||||
'''
|
'''
|
||||||
only load cheese if enzymes are available
|
only load cheese if enzymes are available
|
||||||
'''
|
'''
|
||||||
if HAS_ENZYMES:
|
if HAS_ENZYMES:
|
||||||
return 'cheese'
|
return 'cheese'
|
||||||
else:
|
else:
|
||||||
return (False, 'The cheese execution module cannot be loaded: enzymes unavailable.')
|
return (False, 'The cheese execution module cannot be loaded: enzymes unavailable.')
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@ -294,13 +294,14 @@ the case when the dependency is unavailable.
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
def __virtual__():
|
def __virtual__():
|
||||||
'''
|
'''
|
||||||
only load cheese if enzymes are available
|
only load cheese if enzymes are available
|
||||||
'''
|
'''
|
||||||
if 'cheese.slice' in __salt__:
|
# predicate loading of the cheese state on the corresponding execution module
|
||||||
return 'cheese'
|
if 'cheese.slice' in __salt__:
|
||||||
else:
|
return 'cheese'
|
||||||
return (False, 'The cheese state module cannot be loaded: enzymes unavailable.')
|
else:
|
||||||
|
return (False, 'The cheese state module cannot be loaded: enzymes unavailable.')
|
||||||
|
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
|
Loading…
Reference in New Issue
Block a user