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 3753541  Error out if page not available
3753541 is described below

commit 3753541b6c6e686fa61cf8c3d4ded74d97785665
Author: Sebb <[email protected]>
AuthorDate: Sat Jan 11 00:01:14 2020 +0000

    Error out if page not available
---
 www/incubator/podlings/by-age.cgi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/www/incubator/podlings/by-age.cgi 
b/www/incubator/podlings/by-age.cgi
index f13d141..8d435e6 100755
--- a/www/incubator/podlings/by-age.cgi
+++ b/www/incubator/podlings/by-age.cgi
@@ -11,6 +11,14 @@ require 'whimsy/asf'
 projects = URI.parse('http://incubator.apache.org/projects/')
 table = Nokogiri::HTML(Net::HTTP.get(projects)).at('table')
 
+# Hack to skip processing if cannot get the data
+unless table
+  _text do
+    _ "Could not fetch and parse http://incubator.apache.org/projects/";
+  end
+  exit
+end
+
 # extract a list of [podling names, table row]
 podlings = table.search('tr').map do |tr|
   tds = tr.search('td')

Reply via email to