community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1709161 - /comdev/reporter.apache.org/trunk/data/parsepmcs.py
Date Sat, 17 Oct 2015 12:54:54 GMT
Author: sebb
Date: Sat Oct 17 12:54:53 2015
New Revision: 1709161

URL: http://svn.apache.org/viewvc?rev=1709161&view=rev
Log:
Don't ignore failure to read the input files; these are vital for calculating the history!
Ensure that can read utf-8 data

Modified:
    comdev/reporter.apache.org/trunk/data/parsepmcs.py

Modified: comdev/reporter.apache.org/trunk/data/parsepmcs.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/data/parsepmcs.py?rev=1709161&r1=1709160&r2=1709161&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/data/parsepmcs.py (original)
+++ comdev/reporter.apache.org/trunk/data/parsepmcs.py Sat Oct 17 12:54:53 2015
@@ -28,20 +28,13 @@ import os
 import datetime
 import time
 pmcs = {}
-try:
-    with open("pmcs.json", "r") as f:
-        pmcs = json.loads(f.read())
-        f.close()
-except:
-    pass
+
+with open("pmcs.json", "r", encoding='utf-8') as f:
+    pmcs = json.loads(f.read())
 
 projects = {}
-try:
-    with open("projects.json", "r") as f:
-        projects = json.loads(f.read())
-        f.close()
-except:
-    pass
+with open("projects.json", "r", encoding='utf-8') as f:
+    projects = json.loads(f.read())
 
 
 people = {}



Mime
View raw message