You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2015/10/17 14:54:54 UTC

svn commit: r1709161 - /comdev/reporter.apache.org/trunk/data/parsepmcs.py

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 = {}