aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2013-02-10 20:07:08 -0600
committerJack Nagel2013-02-10 20:10:15 -0600
commit8e2b8c1419c7c95274dae4e012a1068301676ffd (patch)
treeb71d9b6856f2d496e8c03d8510b4d251470ee9e3
parent3e9241312d869ec458a1cc29c844489e163c47bf (diff)
downloadbrew-8e2b8c1419c7c95274dae4e012a1068301676ffd.tar.bz2
CurlDownloadStrategy: remove pointless type introspection
-rw-r--r--Library/Homebrew/download_strategy.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index af3e089ad..6ac225331 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -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