audit: check pypi URLs

#373 implemented as a strict check (thanks nijikon)
This commit is contained in:
Mike McQuaid 2017-06-02 22:28:03 +01:00
parent 0731a68cde
commit cbfc83309f

View File

@ -1496,6 +1496,14 @@ class ResourceAuditor
problem "#{u} should be `https://search.maven.org/remotecontent?filepath=#{$1}`" problem "#{u} should be `https://search.maven.org/remotecontent?filepath=#{$1}`"
end end
# Check pypi urls
if @strict
urls.each do |p|
next unless p =~ %r{^https?://pypi.python.org/(.*)}
problem "#{p} should be `https://files.pythonhosted.org/#{$2}`"
end
end
return unless @online return unless @online
urls.each do |url| urls.each do |url|
next if !@strict && mirrors.include?(url) next if !@strict && mirrors.include?(url)