community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1705952 - /comdev/reporter.apache.org/trunk/site/getjson.py
Date Tue, 29 Sep 2015 23:39:18 GMT
Author: sebb
Date: Tue Sep 29 23:39:17 2015
New Revision: 1705952

URL: http://svn.apache.org/viewvc?rev=1705952&view=rev
Log:
Remove unnecessary nesting

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=1705952&r1=1705951&r2=1705952&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/getjson.py (original)
+++ comdev/reporter.apache.org/trunk/site/getjson.py Tue Sep 29 23:39:17 2015
@@ -133,19 +133,19 @@ def getProjectData(project):
         with open("/var/www/projects.apache.org/site/json/projects/%s.json" % project, "r")
as f:
             x = json.loads(f.read())
             f.close()
-            with open("/var/www/projects.apache.org/site/json/foundation/pmcs.json", "r")
as f:
-                p = json.loads(f.read())
-                f.close()
-                for xproject in p:
-                    y.append(xproject)
-                    if xproject == project:
-                        x['name'] = p[project]['name']
-            with open("/var/www/projects.apache.org/site/json/foundation/chairs.json", "r")
as f:
-                c = json.loads(f.read())
-                f.close()
-                for xproject in c:
-                    if xproject.lower() == x['name'].lower():
-                        x['chair'] = c[xproject]
+        with open("/var/www/projects.apache.org/site/json/foundation/pmcs.json", "r") as
f:
+            p = json.loads(f.read())
+            f.close()
+            for xproject in p:
+                y.append(xproject)
+                if xproject == project:
+                    x['name'] = p[project]['name']
+        with open("/var/www/projects.apache.org/site/json/foundation/chairs.json", "r") as
f:
+            c = json.loads(f.read())
+            f.close()
+            for xproject in c:
+                if xproject.lower() == x['name'].lower():
+                    x['chair'] = c[xproject]
         z = {}
         with open("/var/www/reporter.apache.org/data/health.json", "r") as f:
             h = json.loads(f.read())



Mime
View raw message