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:
Wanlong Gao 2015-12-29 09:35:25 +08:00
parent 078ef89829
commit 094009f494
1 changed files with 1 additions and 1 deletions

View File

@ -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'),