From 094009f494661ac7c59dcf442a662c4c070c43e9 Mon Sep 17 00:00:00 2001 From: Wanlong Gao Date: Tue, 29 Dec 2015 09:35:25 +0800 Subject: [PATCH] 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 --- magnumclient/common/httpclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magnumclient/common/httpclient.py b/magnumclient/common/httpclient.py index 75a6d8ef..bad85ff0 100644 --- a/magnumclient/common/httpclient.py +++ b/magnumclient/common/httpclient.py @@ -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'),