From 18a69b8733ade6deaa8d9d9022c776cc3667a4c3 Mon Sep 17 00:00:00 2001 From: Yatin Kumbhare Date: Mon, 4 Jan 2016 14:32:20 +0530 Subject: [PATCH] Changing 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: I58d0a816d5f1f338de7ae3fdb97011568dc97d94 --- 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: