diff options
| author | Andrey Kurilin <akurilin@mirantis.com> | 2016-09-07 12:39:12 +0300 |
|---|---|---|
| committer | Andrey Kurilin <akurilin@mirantis.com> | 2016-09-07 12:54:24 +0300 |
| commit | 090e5ffc691c5d40e45ab0c20dc88032a0987b20 (patch) | |
| tree | e61180ac440f4cc35b9823eb5aebbd083250fb64 /tools | |
| parent | 7c6cc05ff0e9e95313384303deee69ef11929bc1 (diff) | |
| download | python-ceilometerclient-2.6.1.tar.gz | |
Fix from_response method to process response from requests2.6.1
SessionClient uses requests library. It's response class doesn't have
"status" property[1], so in case of any errors(with status code > 400),
from_response method is called and raises AttributeError.
Also, HTTPClient implementation uses requests lib by default[2](if 'http'
argument was not transmitted), so from_response method will raise
AttributeError too.
[1] - http://docs.python-requests.org/en/master/api/#requests.Response.status_code
[2] - https://github.com/openstack/python-ceilometerclient/blob/2.6.0/ceilometerclient/openstack/common/apiclient/client.py#L99-L100
Change-Id: Id8fb2f386e8101951716f30a6365c9aa15bd4b24
Closes-Bug: #1620974
(cherry picked from commit 1b1917ab9b56fe92235ce336d3df3e7a8c1c81d2)
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions
