From 545b68684548294a46c3753a5a16513c0cb64410 Mon Sep 17 00:00:00 2001 From: "Swapnil Kulkarni (coolsvap)" Date: Mon, 4 Jan 2016 21:44:32 +0530 Subject: [PATCH] Replace deprecated LOG.warn with LOG.warning LOG.warn is deprecated. It still used in a few places. Updated to non-deprecated LOG.warning. Change-Id: Id321f741793b3f471d0cb22988385c4b083a2353 Partial-Bug:#1508442 --- zaqar/storage/mongodb/utils.py | 4 ++-- zaqar/storage/redis/utils.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zaqar/storage/mongodb/utils.py b/zaqar/storage/mongodb/utils.py index 2e424784d..28392c7f4 100644 --- a/zaqar/storage/mongodb/utils.py +++ b/zaqar/storage/mongodb/utils.py @@ -287,8 +287,8 @@ def retries_on_autoreconnect(func): break except errors.AutoReconnect as ex: - LOG.warn(_(u'Caught AutoReconnect, retrying the ' - 'call to {0}').format(func)) + LOG.warning(_(u'Caught AutoReconnect, retrying the ' + 'call to {0}').format(func)) last_ex = ex time.sleep(sleep_sec * (2 ** attempt)) diff --git a/zaqar/storage/redis/utils.py b/zaqar/storage/redis/utils.py index 01666a423..530ccae44 100644 --- a/zaqar/storage/redis/utils.py +++ b/zaqar/storage/redis/utils.py @@ -210,8 +210,8 @@ def retries_on_connection_error(func): # MasterNotFoundError. ex = sys.exc_info()[1] - LOG.warn(_(u'Caught ConnectionError, retrying the ' - 'call to {0}').format(func)) + LOG.warning(_(u'Caught ConnectionError, retrying the ' + 'call to {0}').format(func)) time.sleep(sleep_sec * (2 ** attempt)) else: