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 de5d2552 Temp hack
de5d2552 is described below

commit de5d25525cf77fab29a6331e2cbc4547e3b1a4e9
Author: Sebb <[email protected]>
AuthorDate: Mon Nov 25 10:14:09 2024 +0000

    Temp hack
---
 lib/whimsy/sitestandards.rb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/whimsy/sitestandards.rb b/lib/whimsy/sitestandards.rb
index 53bba677..6d38b195 100644
--- a/lib/whimsy/sitestandards.rb
+++ b/lib/whimsy/sitestandards.rb
@@ -193,7 +193,11 @@ module SiteStandards
     local_copy = File.expand_path("#{get_url(true)}#{get_filename(tlp)}", 
__FILE__)
     if File.exist? local_copy
       crawl_time = File.mtime(local_copy).httpdate # show time in same format 
as last-mod
-      sites = JSON.parse(File.read(local_copy))
+      begin
+        sites = JSON.parse(File.read(local_copy))
+      rescue
+        sites = {} # TODO temporary fix
+      end
     else
       Wunderbar.warn "Failed to find #{local_copy}"
       response = 
Net::HTTP.get_response(URI("#{get_url(false)}#{get_filename(tlp)}"))

Reply via email to