v0.15.6 Minor fix

This commit is contained in:
David Sainty 2024-06-26 21:57:32 +10:00
parent 2e9268d993
commit 26c18138eb

View File

@ -1,5 +1,5 @@
# gossamer threads migration-import code
# v0.15.5
# v0.15.6
require 'mysql2'
require 'open-uri'
@ -188,7 +188,7 @@ class GossamerForumsImporter < ImportScripts::Base
def download_attachment(url)
begin
puts "URL: '#{url}'"
URI.open(url).read
URI.open(url, ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE).read
rescue OpenURI::HTTPError => e
puts "Failed to download attachment from #{url}: #{e.message}"
nil