labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1605084 - /labs/panopticon/pan-utils/src/asf/data/releases.py
Date Tue, 24 Jun 2014 13:57:49 GMT
Author: adc
Date: Tue Jun 24 13:57:49 2014
New Revision: 1605084

URL: http://svn.apache.org/r1605084
Log:
Fixed another bug.

Modified:
    labs/panopticon/pan-utils/src/asf/data/releases.py

Modified: labs/panopticon/pan-utils/src/asf/data/releases.py
URL: http://svn.apache.org/viewvc/labs/panopticon/pan-utils/src/asf/data/releases.py?rev=1605084&r1=1605083&r2=1605084&view=diff
==============================================================================
--- labs/panopticon/pan-utils/src/asf/data/releases.py (original)
+++ labs/panopticon/pan-utils/src/asf/data/releases.py Tue Jun 24 13:57:49 2014
@@ -64,7 +64,7 @@ def scrape_release_url(release_url, igno
         soup = bs4.BeautifulSoup(request.body_string())
 
         # let's put the protocol in canonical form so that it's easily compared
-        canonical_url = scanning_url.replace('https://', 'http://', count=1)
+        canonical_url = scanning_url.replace('https://', 'http://', 1)
 
         resources = collections.defaultdict(dict)
         for link in soup.find_all('a'):
@@ -75,7 +75,7 @@ def scrape_release_url(release_url, igno
 
             full_href = urlparse.urljoin(scanning_url, href)
             # put the protocol in canonical form so that it's easily compared
-            if not full_href.replace('https://', 'http://', count=1).startswith(canonical_url):
+            if not full_href.replace('https://', 'http://', 1).startswith(canonical_url):
                 # if we're wandering off the original release URL then we've
                 # accidentally hit a link that goes off-site
                 log.debug('ignored off-site href %s in %s', href, scanning_url)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message