Merge pull request #8251 from heewa/pip_vcs_error_msg

Avoid hiding error context in VCS pip install.
This commit is contained in:
Thomas S Hatch 2013-11-06 14:37:35 -08:00
commit f65d7e46c4

View File

@ -178,6 +178,8 @@ def installed(name,
ret.setdefault('warnings', []).append(msg)
name = repo
from_vcs = False
if name:
try:
try:
@ -195,6 +197,7 @@ def installed(name,
if name.startswith(supported_vcs):
for vcs in supported_vcs:
if name.startswith(vcs):
from_vcs = True
install_req = pip.req.InstallRequirement.from_line(
name.split('{0}+'.format(vcs))[-1]
)
@ -203,7 +206,7 @@ def installed(name,
install_req = pip.req.InstallRequirement.from_line(name)
except ValueError as exc:
ret['result'] = False
if '=' in name and '==' not in name:
if not from_vcs and '=' in name and '==' not in name:
ret['comment'] = (
'Invalid version specification in package {0}. \'=\' is '
'not supported, use \'==\' instead.'.format(name)