Save error files only if --all option is passed

This commit is contained in:
hartator 2016-08-09 12:53:46 -05:00
parent 5d4fa42fda
commit a397476681

View File

@ -160,7 +160,10 @@ class WaybackMachineDownloader
end end
rescue OpenURI::HTTPError => e rescue OpenURI::HTTPError => e
puts "#{file_url} # #{e}" puts "#{file_url} # #{e}"
file.write(e.io.read) if @all
file.write(e.io.read)
puts "#{file_path} saved anyway."
end
rescue StandardError => e rescue StandardError => e
puts "#{file_url} # #{e}" puts "#{file_url} # #{e}"
end end