community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From he...@apache.org
Subject svn commit: r1822208 - /comdev/reporter.apache.org/trunk/site/getjson-hppdev.py
Date Thu, 25 Jan 2018 17:31:47 GMT
Author: henkp
Date: Thu Jan 25 17:31:46 2018
New Revision: 1822208

URL: http://svn.apache.org/viewvc?rev=1822208&view=rev
Log:
get checker json on the fly ; use cache as fallback

Modified:
    comdev/reporter.apache.org/trunk/site/getjson-hppdev.py

Modified: comdev/reporter.apache.org/trunk/site/getjson-hppdev.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/getjson-hppdev.py?rev=1822208&r1=1822207&r2=1822208&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/getjson-hppdev.py (original)
+++ comdev/reporter.apache.org/trunk/site/getjson-hppdev.py Thu Jan 25 17:31:46 2018
@@ -273,7 +273,13 @@ if re.match(r"^[-a-zA-Z0-9_.]+$", user):
     keys = {}
     count = {}
     health = {}
-    checker_json = readJson(RAOHOME+"data/cache/checker.json", None)
+    checker_json = None
+    try:
+        request  = urllib2.Request("https://checker.apache.org/json/", None)
+        response = urllib2.urlopen(request, timeout=1)
+        checker_json = response.read()
+    except:
+        checker_json = readJson(RAOHOME+"data/cache/checker.json", None)
     checker = {}
     for group in groups:
         jiras = []



Mime
View raw message