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 dcfd44e6 Allow for broken links
dcfd44e6 is described below

commit dcfd44e6919c5b06de0909fc2b7a31492cbaa7d0
Author: Sebb <[email protected]>
AuthorDate: Tue May 10 23:22:51 2022 +0100

    Allow for broken links
---
 lib/whimsy/asf/mlist.rb | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/whimsy/asf/mlist.rb b/lib/whimsy/asf/mlist.rb
index cccf7413..8be41062 100644
--- a/lib/whimsy/asf/mlist.rb
+++ b/lib/whimsy/asf/mlist.rb
@@ -378,9 +378,14 @@ module ASF
         if parts[-1] == type
           dom = parts[-3].downcase.freeze
           list = parts[-2].downcase.freeze
-          mails = File.read(path).split("\n")
-          cache << [dom, list, mails]
-          yield [dom, list, mails]
+          begin
+            # During mail migration links are used - allow for broken ones
+            mails = File.read(path).split("\n")
+            cache << [dom, list, mails]
+            yield [dom, list, mails]
+          rescue StandardError => e
+            Wunderbar.warn e
+          end
         end
       end
       @@file_parsed[type] = WeakRef.new(cache)

Reply via email to