Skip to content

Commit 08d653a

Browse files
committed
downloaer: use fallback URLs for not found too
1 parent 6529b52 commit 08d653a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/datasets/downloader.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ def download(output_path, &block)
177177
$stderr.puts "Redirect to #{url}"
178178
return start_http(url, fallback_urls, headers, limit - 1, &block)
179179
else
180-
if response.is_a?(Net::HTTPForbidden)
180+
case response
181+
when Net::HTTPForbidden, Net::HTTPNotFound
181182
next_url, *rest_fallback_urls = fallback_urls
182183
if next_url
183184
message = "#{response.code}: #{response.message}: " +

0 commit comments

Comments
 (0)