Merge "Fix Typos in comments"
This commit is contained in:
@@ -258,7 +258,7 @@ class VerifiedHTTPSConnection(HTTPSConnection):
|
|||||||
excp_lst = (TypeError, FileNotFoundError, ssl.SSLError)
|
excp_lst = (TypeError, FileNotFoundError, ssl.SSLError)
|
||||||
else:
|
else:
|
||||||
# NOTE(jamespage)
|
# NOTE(jamespage)
|
||||||
# Accomodate changes in behaviour for pep-0467, introduced
|
# Accommodate changes in behaviour for pep-0467, introduced
|
||||||
# in python 2.7.9.
|
# in python 2.7.9.
|
||||||
# https://github.com/python/peps/blob/master/pep-0476.txt
|
# https://github.com/python/peps/blob/master/pep-0476.txt
|
||||||
excp_lst = (TypeError, IOError, ssl.SSLError)
|
excp_lst = (TypeError, IOError, ssl.SSLError)
|
||||||
|
@@ -155,7 +155,7 @@ def from_response(response, body=None):
|
|||||||
"""Return an instance of an HTTPException based on httplib response."""
|
"""Return an instance of an HTTPException based on httplib response."""
|
||||||
cls = _code_map.get(response.status_code, HTTPException)
|
cls = _code_map.get(response.status_code, HTTPException)
|
||||||
if body and 'json' in response.headers['content-type']:
|
if body and 'json' in response.headers['content-type']:
|
||||||
# Iterate over the nested objects and retreive the "message" attribute.
|
# Iterate over the nested objects and retrieve the "message" attribute.
|
||||||
messages = [obj.get('message') for obj in response.json().values()]
|
messages = [obj.get('message') for obj in response.json().values()]
|
||||||
# Join all of the messages together nicely and filter out any objects
|
# Join all of the messages together nicely and filter out any objects
|
||||||
# that don't have a "message" attr.
|
# that don't have a "message" attr.
|
||||||
|
Reference in New Issue
Block a user