Merge "Fix an error on not finding log handler"

This commit is contained in:
Jenkins
2015-01-15 04:45:59 +00:00
committed by Gerrit Code Review

View File

@@ -172,7 +172,8 @@ class HTTPClient(object):
self.log_http_response(resp)
if 400 <= resp.status < 600:
LOG.warn("Request returned failure status.")
if LOG.handlers:
LOG.warn("Request returned failure status.")
error_json = self._extract_error_json(body_str)
raise exceptions.from_response(
resp, error_json.get('faultstring'),