From e72c9d5ef8883f93ca02f662f11525e5320e6aab Mon Sep 17 00:00:00 2001 From: zhangguoqing Date: Mon, 4 Jan 2016 14:05:29 +0000 Subject: [PATCH] Change LOG.warn to LOG.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: I6916a95800f003e96736c7e8fe45f3cfe242d983 Closes-Bug: #1530742 --- cloudpulseclient/common/httpclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudpulseclient/common/httpclient.py b/cloudpulseclient/common/httpclient.py index 92be038..2383d03 100644 --- a/cloudpulseclient/common/httpclient.py +++ b/cloudpulseclient/common/httpclient.py @@ -172,7 +172,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 = self._extract_error_json(body_str) raise exceptions.from_response( resp, error_json.get('faultstring'),