community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1828422 - /comdev/projects.apache.org/scripts/cronjobs/parseprojects.py
Date Thu, 05 Apr 2018 11:59:30 GMT
Author: sebb
Date: Thu Apr  5 11:59:30 2018
New Revision: 1828422

URL: http://svn.apache.org/viewvc?rev=1828422&view=rev
Log:
More detail in mail messages

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=1828422&r1=1828421&r2=1828422&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/parseprojects.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/parseprojects.py Thu Apr  5 11:59:30 2018
@@ -34,6 +34,8 @@ URL_TIMEOUT = 60.0 # timeout for URL req
 PROJECTS_DIR = '../../site/json/projects'
 
 projectsList = "../../data/projects.xml";
+PROJECTS_SVN = 'https://svn.apache.org/repos/asf/comdev/projects.apache.org/data/projects.xml'
+
 save = True;
 if os.path.exists("parseprojects-failures.xml"):
     # Only use restart data if requested (e.g. when running interactively)
@@ -251,12 +253,14 @@ for s in itemlist :
         if isinstance(err, OSError): # OSError is parent of HTTPError/URLError
             # Only mail 404 errors individually
             if isinstance(err, urllib.error.HTTPError) and err.code == 404:
-                printMail("Cannot find doap file %s:" % url, file=sys.stderr, body=err.filename)
+                printMail("Cannot find doap file: %s" % url, file=sys.stderr,
+                          body=("URL: %s\n%s\nSource: %s" % (url,str(err),PROJECTS_SVN)))
             else:
                 print("Error when processing doap file %s:" % url, file=sys.stderr)
                 unreportedError = True
         else:
-            printMail("Error when processing doap file %s:" % url, file=sys.stderr, body=str(err))
+            printMail("Error when processing doap file %s:" % url, file=sys.stderr,
+                      body=("URL: %s\n%s\nSource: %s" % (url,str(err),PROJECTS_SVN)))
         print("-"*60, file=sys.stderr)
         traceback.print_exc()
         if isinstance(err, OSError): # OSError is parent of HTTPError/URLError 



Mime
View raw message