mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
add virtual function
This commit is contained in:
parent
8d2d885f62
commit
5a84887c4c
@ -12,6 +12,17 @@ from contextlib import closing
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
__virtualname__ = 'archive'
|
||||
|
||||
|
||||
def __virtual__():
|
||||
'''
|
||||
Only load if the npm module is available in __salt__
|
||||
'''
|
||||
return __virtualname__ \
|
||||
if [x for x in __salt__ if x.startswith('archive.')] \
|
||||
else False
|
||||
|
||||
|
||||
def extracted(name,
|
||||
source,
|
||||
|
Loading…
Reference in New Issue
Block a user