incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r1790522 - /incubator/public/trunk/devlists.py
Date Fri, 07 Apr 2017 08:39:23 GMT
Author: gstein
Date: Fri Apr  7 08:39:23 2017
New Revision: 1790522

URL: http://svn.apache.org/viewvc?rev=1790522&view=rev
Log:
* move a couple values to global "constant" symbols
* switch to http: to simplify fetch of the podlings

Modified:
    incubator/public/trunk/devlists.py

Modified: incubator/public/trunk/devlists.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/devlists.py?rev=1790522&r1=1790521&r2=1790522&view=diff
==============================================================================
--- incubator/public/trunk/devlists.py (original)
+++ incubator/public/trunk/devlists.py Fri Apr  7 08:39:23 2017
@@ -25,13 +25,16 @@ if sys.version_info < (3, 2):
  
 import xml.dom.minidom
 import urllib.request
+
+PODLINGS_URL = 'http://svn.apache.org/repos/asf/incubator/public/trunk/content/podlings.xml'
+SPECIALS = ['wave','blur']
+
  
 def processPodlings(xmlFile):
     """
     Parse a podlings.xml stream
     """
     dom = xml.dom.minidom.parse(xmlFile)
-    specials = ['wave','blur']
     for row in dom.getElementsByTagName("podling"):
         if row.getAttribute("status") != 'current':
             continue
@@ -39,13 +42,13 @@ def processPodlings(xmlFile):
         podling_id = podling_id.lower().replace(' ', '')
         if podling_id == 'odftoolkit':
             print("odf-dev@incubator.apache.org")
-        elif podling_id in specials:
+        elif podling_id in SPECIALS:
             print("%s-dev@incubator.apache.org" % podling_id)
         else:
             print("dev@%s.incubator.apache.org" % podling_id)
  
 def main():
-    podlings_xml = urllib.request.urlopen('https://svn.apache.org/repos/asf/incubator/public/trunk/content/podlings.xml')
+    podlings_xml = urllib.request.urlopen(PODLINGS_URL)
     processPodlings(podlings_xml)
  
 if __name__ == '__main__':



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


Mime
View raw message