This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new efa0cdae Allow for multiple errors
efa0cdae is described below

commit efa0cdae382a858434ed4cde8d0501fcdcbe88bb
Author: Sebb <[email protected]>
AuthorDate: Wed Oct 15 00:10:28 2025 +0100

    Allow for multiple errors
---
 tools/site-scan.rb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/site-scan.rb b/tools/site-scan.rb
index 76177219..dbaca9a4 100755
--- a/tools/site-scan.rb
+++ b/tools/site-scan.rb
@@ -76,23 +76,24 @@ def parse(id, site, name, podling=false)
   end
   data[:display_name] = name
   data[:uri] = site
+  data[:errors] = []
   uri = URI.parse(site)
   begin
     Socket.getaddrinfo(uri.host, uri.scheme)
   rescue SocketError => se
-    data[:errors] = se.message
+    data[:errors] << se.message
     return data
   end
   begin
     uri, response, status = $cache.get(site.to_s)
   rescue IOError => ioe
-    data[:errors] = ioe.message
+    data[:errors] << ioe.message
     return data
   end
   puts "@#{__LINE__}: #{id} #{uri} #{status}"
   # Bail and return if getting the site returns an error code
   if response.respond_to? :code and response.code =~ /^[45]/
-    data[:errors] = "cache.get(#{site}) error code #{response.code}"
+    data[:errors] << "cache.get(#{site}) error code #{response.code}"
     return data
   end
   doc = Nokogiri::HTML(response)

Reply via email to