From d8187d7e5fd91ad65b05a52e6ccc8fd0aa54f00c Mon Sep 17 00:00:00 2001 From: wangyu Date: Thu, 12 Sep 2019 17:36:19 +0800 Subject: [PATCH] Replace use of log.warn with log.warning LOG.warn is deprecated in Python3 and was used only here in karbor, this patch updates it to LOG.warning. Change-Id: Icad346bb6fd3efcac2f42fead1327585297f2f96 --- karbor/services/protection/manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/karbor/services/protection/manager.py b/karbor/services/protection/manager.py index 0bb74298..19e22b45 100644 --- a/karbor/services/protection/manager.py +++ b/karbor/services/protection/manager.py @@ -336,7 +336,8 @@ class ProtectionManager(manager.Manager): checkpoint_dict = checkpoint.to_dict() if not context.is_admin and ( context.project_id != checkpoint_dict['project_id']): - LOG.warn("Delete checkpoint(%s) is not allowed." % checkpoint_id) + LOG.warning("Delete checkpoint(%s) is not allowed.", + checkpoint_id) raise exception.DeleteCheckpointNotAllowed( checkpoint_id=checkpoint_id)