You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by hu...@apache.org on 2019/07/31 16:00:13 UTC

svn commit: r1864081 - /comdev/reporter.apache.org/trunk/site/getjson.py

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)