community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1757054 - /comdev/projects.apache.org/scripts/cronjobs/parseprojects.py
Date Sun, 21 Aug 2016 11:53:22 GMT
Author: sebb
Date: Sun Aug 21 11:53:21 2016
New Revision: 1757054

URL: http://svn.apache.org/viewvc?rev=1757054&view=rev
Log:
Simplify; fetch actual URL from error object

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=1757054&r1=1757053&r2=1757054&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/parseprojects.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/parseprojects.py Sun Aug 21 11:53:21 2016
@@ -110,11 +110,7 @@ def name2fileName(s, pmc):
 # Process external PMC descriptor file to extract the PMC name
 def getPMC(url):
     print("Parsing PMC descriptor file %s" % url)
-    try:
-        rdf = urllib.request.urlopen(url, timeout=URL_TIMEOUT).read()
-    except:
-        printMail("WARN: could not read PMC descriptor '%s' " % url)
-        return 'Unknown'
+    rdf = urllib.request.urlopen(url, timeout=URL_TIMEOUT).read()
     md = minidom.parseString(rdf)
     pmc = (md.getElementsByTagName('asfext:pmc') or md.getElementsByTagName('asfext:PMC'))[0]
     t = pmc.tagName.lower()
@@ -248,9 +244,10 @@ for s in itemlist :
         else:
             printMail("WARN: project ignored since unable to extract project json filename
from %s" % url)
     except Exception as err:
-        printMail("Error when reading doap file %s:" % url, file=sys.stderr)
+        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)
         print("-"*60, file=sys.stderr)
         failures.append(url)
         if rdf is not None:



Mime
View raw message