incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1347554 - /incubator/public/trunk/clutch.py
Date Thu, 07 Jun 2012 09:54:42 GMT
Author: sebb
Date: Thu Jun  7 09:54:41 2012
New Revision: 1347554

URL: http://svn.apache.org/viewvc?rev=1347554&view=rev
Log:
Add 5s timeout so invalid URLs don't cause a long wait
Use resourceAliases from podlings.xml rather than local overrides

Modified:
    incubator/public/trunk/clutch.py

Modified: incubator/public/trunk/clutch.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/clutch.py?rev=1347554&r1=1347553&r2=1347554&view=diff
==============================================================================
--- incubator/public/trunk/clutch.py (original)
+++ incubator/public/trunk/clutch.py Thu Jun  7 09:54:41 2012
@@ -147,7 +147,7 @@ def logexternal(string):
 
 def getUrl(url):
   logexternal(url)
-  return urllib.request.urlopen(url)
+  return urllib.request.urlopen(url, timeout=5) # ensure invalid URLs don't cause long wait
 
 def osExec(list):
   logexternal(" ".join(list))
@@ -277,20 +277,6 @@ for k in sorted(projectNames, key=str.lo
   if projects[k]['reportingGroup'] == 'month':
     print("ERROR: {0}: missing group".format(k))
     projects[k]['hasReportingGroup'] = False
-  # Some projects use an alternate short resource name
-  # rather than their project name
-  if k == "zetacomponents":
-    projects[k]['resourceNames'].append("zeta")
-  elif k == "beanvalidation":
-    projects[k]['resourceNames'].append("bval")
-  elif k == "lucene.net":
-    projects[k]['resourceNames'].append("lucene-net")
-  elif k == "manifoldcf":
-    projects[k]['resourceNames'].append("connectors")
-  elif k == "openoffice.org":
-    projects[k]['resourceNames'].append("ooo")
-  elif k == "odftoolkit":
-    projects[k]['resourceNames'].append("odf")
 
 # Parse the projects table, ensure each is present, grab more details
 
@@ -321,6 +307,11 @@ for row in dom.getElementsByTagName("pod
   graduatedProjects[resource.lower()] = True
  if row.getAttribute("status") == 'current':
   #print("Name: " + name)
+  # Some projects use an alternate short resource name
+  # rather than their project name
+  for alias in row.getAttribute("resourceAliases").split(','):
+    if alias != '':
+      projects[id]['resourceNames'].append(alias)
   fileBaseName = row.getAttribute("resource")
   sponsor = row.getAttribute("sponsor")
   description = getText(row.getElementsByTagName("description"))



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message