community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1757162 - /comdev/projects.apache.org/scripts/cronjobs/parseprojects.py
Date Mon, 22 Aug 2016 13:28:02 GMT
Author: sebb
Date: Mon Aug 22 13:28:02 2016
New Revision: 1757162

URL: http://svn.apache.org/viewvc?rev=1757162&view=rev
Log:
Only extract filename if it exists

Modified:
    comdev/projects.apache.org/scripts/cronjobs/parseprojects.py

Modified: comdev/projects.apache.org/scripts/cronjobs/parseprojects.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/cronjobs/parseprojects.py?rev=1757162&r1=1757161&r2=1757162&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/parseprojects.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/parseprojects.py Mon Aug 22 13:28:02 2016
@@ -32,7 +32,7 @@ URL_TIMEOUT = 60.0 # timeout for URL req
 
 PROJECTS_DIR = '../../site/json/projects'
 
-projectsList = "../../data/projects.xml";
+projectsList = "../../data/projects2.xml";
 save = True;
 if os.path.exists("parseprojects-failures.xml"):
     # Only use restart data if requested (e.g. when running interactively)
@@ -247,7 +247,8 @@ for s in itemlist :
         printMail("Error when processing doap file %s:" % url, file=sys.stderr)
         print("-"*60, file=sys.stderr)
         traceback.print_exc()
-        print("URL: '%s'" % err.filename, file=sys.stderr)
+        if isinstance(err, OSError): # OSError is parent of HTTPError/URLError 
+            print("URL: '%s'" % err.filename, file=sys.stderr)
         print("-"*60, file=sys.stderr)
         failures.append(url)
         if rdf is not None:



Mime
View raw message