mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #26389 from rallytime/bp-26160
Back-port #26160 to 2015.5
This commit is contained in:
commit
2fd1e06343
1 changed files with 11 additions and 1 deletions
|
@ -57,7 +57,7 @@ def __virtual__():
|
|||
'''
|
||||
Only load if the pip module is available in __salt__
|
||||
'''
|
||||
if HAS_PIP and 'pip.list' in __salt__:
|
||||
if 'pip.list' in __salt__:
|
||||
return __virtualname__
|
||||
return False
|
||||
|
||||
|
@ -98,6 +98,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…
Add table
Reference in a new issue