Use six.moves.http_client instead of httplib
The httplib module has been renamed to http.client in Python 3. We can use six.moves.http_client to let it support Python 3. See http://docs.python.org/2/library/httplib.html#module-httplib Part of blueprint py33 Change-Id: I860446d808b182852edad205f4e0cde586a864aa
This commit is contained in:
		 ChangBo Guo(gcb)
					ChangBo Guo(gcb)
				
			
				
					committed by
					
						 Gerrit Code Review
						Gerrit Code Review
					
				
			
			
				
	
			
			
			 Gerrit Code Review
						Gerrit Code Review
					
				
			
						parent
						
							94d91e6e06
						
					
				
				
					commit
					1439624aa4
				
			| @@ -15,11 +15,11 @@ | ||||
|  | ||||
| from email import utils as email_utils | ||||
| import gzip | ||||
| import httplib | ||||
| import re | ||||
| import StringIO | ||||
|  | ||||
| import six | ||||
| from six.moves import http_client | ||||
| from six.moves.urllib import parse | ||||
|  | ||||
| from stackalytics.openstack.common import log as logging | ||||
| @@ -65,7 +65,7 @@ def _get_mail_archive_links(uri): | ||||
| def _link_content_changed(link, runtime_storage_inst): | ||||
|     LOG.debug('Check changes for mail archive located at uri: %s', link) | ||||
|     parsed_uri = parse.urlparse(link) | ||||
|     conn = httplib.HTTPConnection(parsed_uri.netloc) | ||||
|     conn = http_client.HTTPConnection(parsed_uri.netloc) | ||||
|     conn.request('HEAD', parsed_uri.path) | ||||
|     res = conn.getresponse() | ||||
|     last_modified = res.getheader('last-modified') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user