https is a sane package source URL scheme
Add https as a URL source and use list comprehension to check the supported protocols.
This commit is contained in:
parent
831a3d7684
commit
611cef1823
@ -214,10 +214,10 @@ def get_yum_base_object(installroot, repositories, mirrorlists=None,
|
|||||||
tempdir="/var/tmp", proxy=None, excludepkgs=None):
|
tempdir="/var/tmp", proxy=None, excludepkgs=None):
|
||||||
|
|
||||||
def sanitize_repo(repo):
|
def sanitize_repo(repo):
|
||||||
|
"""Convert bare paths to file:/// URIs, and silently reject protocols unhandled by yum"""
|
||||||
if repo.startswith("/"):
|
if repo.startswith("/"):
|
||||||
return "file://{0}".format(repo)
|
return "file://{0}".format(repo)
|
||||||
elif (repo.startswith("http://") or repo.startswith("ftp://")
|
elif any(repo.startswith(p) for p in ('http://', 'https://', 'ftp://', 'file://')):
|
||||||
or repo.startswith("file://")):
|
|
||||||
return repo
|
return repo
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user