mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
proposed fix for #26155
This commit is contained in:
parent
74558f5743
commit
ca406eaf3c
@ -57,7 +57,11 @@ def __virtual__():
|
||||
'''
|
||||
Only load if the pip module is available in __salt__
|
||||
'''
|
||||
if HAS_PIP and 'pip.list' in __salt__:
|
||||
if not HAS_PIP:
|
||||
logger.warning(
|
||||
'An importable pip module could not be found on your system'
|
||||
)
|
||||
if 'pip.list' in __salt__:
|
||||
return __virtualname__
|
||||
return False
|
||||
|
||||
@ -98,6 +102,16 @@ def _check_pkg_version_format(pkg):
|
||||
|
||||
ret = {'result': False, 'comment': None,
|
||||
'prefix': None, 'version_spec': None}
|
||||
|
||||
if not HAS_PIP:
|
||||
ret['comment'] = (
|
||||
'An importable pip module is required but could not be found on '
|
||||
'your system. This usually means that the system''s pip package '
|
||||
'is not installed properly.'
|
||||
)
|
||||
|
||||
return ret
|
||||
|
||||
from_vcs = False
|
||||
try:
|
||||
# Get the requirement object from the pip library
|
||||
|
Loading…
Reference in New Issue
Block a user