mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #6167 from tgecho/develop
Allow pip paths to use the file:// protocol and allow local files or directories in find_links.
This commit is contained in:
commit
dc7662c8ce
@ -24,7 +24,7 @@ __func_alias__ = {
|
||||
'list_': 'list'
|
||||
}
|
||||
|
||||
VALID_PROTOS = ['http', 'https', 'ftp']
|
||||
VALID_PROTOS = ['http', 'https', 'ftp', 'file']
|
||||
|
||||
|
||||
def _get_pip_bin(bin_env):
|
||||
@ -300,9 +300,9 @@ def install(pkgs=None,
|
||||
find_links = [l.strip() for l in find_links.split(',')]
|
||||
|
||||
for link in find_links:
|
||||
if not salt.utils.valid_url(link, VALID_PROTOS):
|
||||
if not salt.utils.valid_url(link, VALID_PROTOS) or os.path.exists(link):
|
||||
raise CommandExecutionError(
|
||||
'{0!r} must be a valid URL'.format(link)
|
||||
'{0!r} must be a valid URL or path'.format(link)
|
||||
)
|
||||
cmd.append('--find-links={0}'.format(link))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user