Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
rescue Net::ReadTimeout due to site down to allow other downloaders t…
Browse files Browse the repository at this point in the history
…o have a try
  • Loading branch information
eregon committed Jan 5, 2013
1 parent caccd61 commit f8201a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/suby/downloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ def get_redirection(path, initheader = {})
end

def download
extract download_url
begin
extract download_url
rescue Net::ReadTimeout => error
raise Suby::DownloaderError, error.message
end
end

def subtitles(url_or_response = download_url)
Expand Down

0 comments on commit f8201a3

Please sign in to comment.