diff options
| author | Simon Pasquier <pasquier.simon@gmail.com> | 2013-04-02 17:04:16 +0200 |
|---|---|---|
| committer | Simon Pasquier <pasquier.simon@gmail.com> | 2013-04-02 17:54:22 +0200 |
| commit | 9354f84e59440e6a6eade085e964a7374c73509f (patch) | |
| tree | 62214ced4b0586f0556122275ba58395f337465a /heatclient/common/http.py | |
| parent | 8eaba001434d85f4b9125524ebf55aa8288aa12e (diff) | |
| download | python-heatclient-0.2.2.tar.gz | |
"heat stack-create" doesn't return the error message from server0.2.2
Change-Id: Icef10df6547e5830abb17edf5ed8c622b3b021b5
Fixes: bug #1163335
Diffstat (limited to 'heatclient/common/http.py')
| -rw-r--r-- | heatclient/common/http.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/heatclient/common/http.py b/heatclient/common/http.py index 576e364..16d1bf6 100644 --- a/heatclient/common/http.py +++ b/heatclient/common/http.py @@ -160,7 +160,7 @@ class HTTPClient(object): self.log_http_response(resp, body_str) if 400 <= resp.status < 600: - raise exc.from_response(resp, body_iter) + raise exc.from_response(resp, body_str) elif resp.status in (301, 302, 305): # Redirected. Reissue the request to the new location. location = resp.getheader('location', None) @@ -175,7 +175,7 @@ class HTTPClient(object): raise exc.InvalidEndpoint(message=message) return self._http_request(location, method, **kwargs) elif resp.status == 300: - raise exc.from_response(resp, body_iter) + raise exc.from_response(resp, body_str) return resp, body_str @@ -187,10 +187,10 @@ class HTTPClient(object): if 'body' in kwargs: kwargs['body'] = json.dumps(kwargs['body']) - resp, body_iter = self._http_request(url, method, **kwargs) + resp, body_str = self._http_request(url, method, **kwargs) if 'application/json' in resp.getheader('content-type', None): - body = ''.join([chunk for chunk in body_iter]) + body = body_str try: body = json.loads(body) except ValueError: |
