community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864081 - /comdev/reporter.apache.org/trunk/site/getjson.py
Date Wed, 31 Jul 2019 16:00:13 GMT
Author: humbedooh
Date: Wed Jul 31 16:00:12 2019
New Revision: 1864081

URL: http://svn.apache.org/viewvc?rev=1864081&view=rev
Log:
Always set current user, so as to not confuse.

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

Modified: comdev/reporter.apache.org/trunk/site/getjson.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/getjson.py?rev=1864081&r1=1864080&r2=1864081&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/getjson.py (original)
+++ comdev/reporter.apache.org/trunk/site/getjson.py Wed Jul 31 16:00:12 2019
@@ -246,7 +246,8 @@ if re.match(r"^[-a-zA-Z0-9_.]+$", user):
     # Try cache first?
     wanted_file = "/tmp/%s.json" % "-".join(groups)
     if (os.path.exists(wanted_file) and os.path.getmtime(wanted_file) > (time.time() -
7200)):
-        dump = open(wanted_file, "r").read()
+        dump = json.load(open(wanted_file, "r"))
+        dump['you'] = committers[user]
         sys.stdout.write("Content-Type: application/json\r\nContent-Length: %u\r\n\r\n" %
(len(dump)))
         sys.stdout.write(dump)
         sys.exit(0)



Mime
View raw message