community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1672965 - /comdev/projects.apache.org/scripts/import/rdfparse.py
Date Sun, 12 Apr 2015 01:58:42 GMT
Author: hboutemy
Date: Sun Apr 12 01:58:42 2015
New Revision: 1672965

URL: http://svn.apache.org/r1672965
Log:
improved error reporting

Modified:
    comdev/projects.apache.org/scripts/import/rdfparse.py

Modified: comdev/projects.apache.org/scripts/import/rdfparse.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/import/rdfparse.py?rev=1672965&r1=1672964&r2=1672965&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/import/rdfparse.py (original)
+++ comdev/projects.apache.org/scripts/import/rdfparse.py Sun Apr 12 01:58:42 2015
@@ -4,6 +4,7 @@ import re, urllib.request
 import csv
 import json
 import os
+import traceback
 
 data = urllib.request.urlopen("https://svn.apache.org/repos/asf/infrastructure/site-tools/trunk/projects/files.xml").read()
 xmldoc = minidom.parseString(data)
@@ -82,7 +83,10 @@ for s in itemlist :
                     f.write(json.dumps(pjson, sort_keys=True, indent=0))
                     f.close()
     except Exception as err:
-        print("Error when reading %s's doap file %s: %s" % (prname, url, err))
+        print("Error when reading %s's doap file %s:" % (prname, url))
+        print("-"*60)
+        traceback.print_exc()
+        print("-"*60)
 
 with open ("../../site/json/foundation/projects.json", "w") as f:
     f.write(json.dumps(projects, sort_keys=True, indent=0))



Mime
View raw message