Accept also repositories specified by file://

This commit is contained in:
Martin Gracik 2010-03-31 09:43:49 +02:00
parent 3a914eab34
commit 945714a9fb

View File

@ -31,7 +31,8 @@ def get_yum_base_object(installroot, repositories, mirrorlists=[],
def sanitize_repo(repo):
if repo.startswith("/"):
return "file://{0}".format(repo)
elif repo.startswith("http://") or repo.startswith("ftp://"):
elif (repo.startswith("http://") or repo.startswith("ftp://")
or repo.startswith("file://")):
return repo
else:
return None