mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #30105 from abednarik/virtual_ret_pecl_module
modules.pecl: __virtual__ return err msg.
This commit is contained in:
commit
5e406b4d42
1 changed files with 7 additions and 1 deletions
|
@ -25,9 +25,15 @@ __func_alias__ = {
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
# Define the module's virtual name
|
||||
__virtualname__ = 'pecl'
|
||||
|
||||
|
||||
def __virtual__():
|
||||
return True if salt.utils.which('pecl') else False
|
||||
if salt.utils.which('pecl'):
|
||||
return __virtualname__
|
||||
return (False, 'The pecl execution module not loaded: '
|
||||
'pecl binary is not in the path.')
|
||||
|
||||
|
||||
def _pecl(command, defaults=False):
|
||||
|
|
Loading…
Add table
Reference in a new issue