Python 3 deprecated the logger.warn method in favor of warning
Python 3 deprecated the logger.warn method, see: https://docs.python.org/3/library/logging.html#logging.warning, so we prefer to use warning to avoid DeprecationWarning. Change-Id: If47818a6ce8adb14bc275dc5a6b5ab4b9d189ff7 Closes-Bug: 1508442
This commit is contained in:
parent
078ef89829
commit
094009f494
@ -174,7 +174,7 @@ class HTTPClient(object):
|
||||
self.log_http_response(resp)
|
||||
|
||||
if 400 <= resp.status < 600:
|
||||
LOG.warn("Request returned failure status.")
|
||||
LOG.warning("Request returned failure status.")
|
||||
error_json = _extract_error_json(body_str)
|
||||
raise exceptions.from_response(
|
||||
resp, error_json.get('faultstring'),
|
||||
|
Loading…
Reference in New Issue
Block a user