Fix weird "None" displayed on some errors
logging.exception() should only be called from an exception handler, which is not the case here. Part of bug 1050260. Change-Id: I591a68c458cd733c04cea7d2d640afdbb7dd19f6
This commit is contained in:
@@ -155,7 +155,7 @@ class HTTPClient(object):
|
|||||||
self.log_http_response(resp)
|
self.log_http_response(resp)
|
||||||
|
|
||||||
if 400 <= resp.status < 600:
|
if 400 <= resp.status < 600:
|
||||||
LOG.exception("Request returned failure status.")
|
LOG.error("Request returned failure status.")
|
||||||
raise exc.from_response(resp)
|
raise exc.from_response(resp)
|
||||||
elif resp.status in (301, 302, 305):
|
elif resp.status in (301, 302, 305):
|
||||||
# Redirected. Reissue the request to the new location.
|
# Redirected. Reissue the request to the new location.
|
||||||
|
Reference in New Issue
Block a user