community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1878442 - in /comdev/projects.apache.org/trunk/scripts/cronjobs: parsecommitteeinfo.py urlutils.py
Date Wed, 03 Jun 2020 15:53:36 GMT
Author: sebb
Date: Wed Jun  3 15:53:35 2020
New Revision: 1878442

URL: http://svn.apache.org/viewvc?rev=1878442&view=rev
Log:
Better name: URLget => URLopen

Modified:
    comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitteeinfo.py
    comdev/projects.apache.org/trunk/scripts/cronjobs/urlutils.py

Modified: comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitteeinfo.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitteeinfo.py?rev=1878442&r1=1878441&r2=1878442&view=diff
==============================================================================
--- comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitteeinfo.py (original)
+++ comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitteeinfo.py Wed Jun  3 15:53:35
2020
@@ -24,7 +24,7 @@ import xml.dom.minidom as minidom
 import datetime
 import sendmail
 
-from urlutils import URLget, URLexists
+from urlutils import URLopen, URLexists
 
 sys.path.append("..") # module committee_info is in parent directory
 import committee_info
@@ -88,7 +88,7 @@ for loc in xmldoc.getElementsByTagName('
     url = loc.childNodes[0].data
     try:
         if url.startswith('http'):
-            rdf = URLget(url).read()
+            rdf = URLopen(url).read()
         else:
             with open("../../data/%s" % url, 'r', encoding='utf-8') as f:
                 rdf = f.read()

Modified: comdev/projects.apache.org/trunk/scripts/cronjobs/urlutils.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/scripts/cronjobs/urlutils.py?rev=1878442&r1=1878441&r2=1878442&view=diff
==============================================================================
--- comdev/projects.apache.org/trunk/scripts/cronjobs/urlutils.py (original)
+++ comdev/projects.apache.org/trunk/scripts/cronjobs/urlutils.py Wed Jun  3 15:53:35 2020
@@ -102,7 +102,7 @@ def getIfNewer(url, sinceTime=None, enco
             raise
     return lastMod, response
 
-def URLget(url, sinceTime=None, encoding=None, errors=None, silent=True, debug=False, method='GET'):
+def URLopen(url, sinceTime=None, encoding=None, errors=None, silent=True, debug=False, method='GET'):
     """
     Get the URL response as for getIfNewer, but default to silent=True and omit lastMod from
reply
     """
@@ -288,7 +288,7 @@ if __name__ == '__main__':
     print(URLexists('https://www.apache.org/'))
     print(URLexists('https://www.apache.org/__'))
     print(URLexists('https://__.apache.org/'))
-    resp = URLget('https://www.apache.org/')
+    resp = URLopen('https://www.apache.org/')
     print(resp.headers)
 
     try:



Mime
View raw message