From f78b05cad1c556511e2df801a0653980f95287a9 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 15 Apr 2020 18:40:42 +0800 Subject: [PATCH] fix error --- lib/tasks/feeds_tasks.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/feeds_tasks.rake b/lib/tasks/feeds_tasks.rake index ea82e30..fccf992 100644 --- a/lib/tasks/feeds_tasks.rake +++ b/lib/tasks/feeds_tasks.rake @@ -11,7 +11,7 @@ namespace :feeds_module do req = Net::HTTP::Get.new(uri) http.request(req) end - if (res_net.code == '301' return true) + if (res_net.code == '301' rescue true) begin uri = URI(res_net['location']) res_net = Net::HTTP.start(uri.host, uri.port,:use_ssl => uri.scheme == 'https',open_timeout: 60,read_timeout: 60) do |http|