CurlDownloadStrategy: remove pointless type introspection

This commit is contained in:
Jack Nagel 2013-02-10 20:07:08 -06:00
parent 3e9241312d
commit 8e2b8c1419

View File

@ -73,23 +73,20 @@ class CurlDownloadStrategy < AbstractDownloadStrategy
unless @tarball_path.exist?
begin
_fetch
rescue Exception => e
if e.kind_of? ErrorDuringExecution
raise CurlDownloadStrategyError, "Download failed: #{@url}"
else
raise
end
rescue ErrorDuringExecution
raise CurlDownloadStrategyError, "Download failed: #{@url}"
end
ignore_interrupts { @temporary_path.rename(@tarball_path) }
else
puts "Already downloaded: #{@tarball_path}"
end
return @tarball_path # thus performs checksum verification
rescue CurlDownloadStrategyError
raise if @mirrors.empty?
puts "Trying a mirror..."
@url = @mirrors.shift
retry
else
@tarball_path
end
def stage