2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-14 03:37:47 +00:00

Fix webclient viability after error

When error encountered, we still need to consume
the response with rsp.read(), or else a subsequent
request will fail.

Change-Id: Ica4f69cadf32a204af3e69a1ee6d336e08f7fc78
This commit is contained in:
Jarrod Johnson 2016-10-12 10:48:08 -04:00
parent aee3ae36b0
commit 66e0b916e4

View File

@ -63,6 +63,8 @@ class SecureHTTPConnection(httplib.HTTPConnection, object):
rsp = self.getresponse()
if rsp.status == 200:
return json.loads(rsp.read())
rsp.read()
return {}
def request(self, method, url, body=None, headers=None):
if headers is None: