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
This commit is contained in:
parent
cec45e27a1
commit
18a69b8733
@ -287,8 +287,8 @@ def retries_on_autoreconnect(func):
|
|||||||
break
|
break
|
||||||
|
|
||||||
except errors.AutoReconnect as ex:
|
except errors.AutoReconnect as ex:
|
||||||
LOG.warn(_(u'Caught AutoReconnect, retrying the '
|
LOG.warning(_(u'Caught AutoReconnect, retrying the '
|
||||||
'call to {0}').format(func))
|
'call to {0}').format(func))
|
||||||
|
|
||||||
last_ex = ex
|
last_ex = ex
|
||||||
time.sleep(sleep_sec * (2 ** attempt))
|
time.sleep(sleep_sec * (2 ** attempt))
|
||||||
|
@ -210,8 +210,8 @@ def retries_on_connection_error(func):
|
|||||||
# MasterNotFoundError.
|
# MasterNotFoundError.
|
||||||
|
|
||||||
ex = sys.exc_info()[1]
|
ex = sys.exc_info()[1]
|
||||||
LOG.warn(_(u'Caught ConnectionError, retrying the '
|
LOG.warning(_(u'Caught ConnectionError, retrying the '
|
||||||
'call to {0}').format(func))
|
'call to {0}').format(func))
|
||||||
|
|
||||||
time.sleep(sleep_sec * (2 ** attempt))
|
time.sleep(sleep_sec * (2 ** attempt))
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user