Change 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: Ic7496d4dc765586e1bc79c3202b80c444443faf0 Closes-Bug: #1530742
This commit is contained in:
parent
500a075963
commit
b3cde50695
|
@ -352,7 +352,7 @@ class Server(object):
|
||||||
self.stale_children.remove(pid)
|
self.stale_children.remove(pid)
|
||||||
LOG.info(_LI('Removed stale child %s'), pid)
|
LOG.info(_LI('Removed stale child %s'), pid)
|
||||||
else:
|
else:
|
||||||
LOG.warn(_LW('Unrecognised child %s'), pid)
|
LOG.warning(_LW('Unrecognized child %s'), pid)
|
||||||
|
|
||||||
def _verify_and_respawn_children(self, pid, status):
|
def _verify_and_respawn_children(self, pid, status):
|
||||||
if len(self.stale_children) == 0:
|
if len(self.stale_children) == 0:
|
||||||
|
|
|
@ -83,7 +83,7 @@ class Registry(object):
|
||||||
registry = self._registry
|
registry = self._registry
|
||||||
if info is None:
|
if info is None:
|
||||||
# delete this entry.
|
# delete this entry.
|
||||||
LOG.warn(_LW('Removing %(item)s from registry'), {'item': name})
|
LOG.warning(_LW('Removing %(item)s from registry'), {'item': name})
|
||||||
registry.pop(name, None)
|
registry.pop(name, None)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -95,7 +95,8 @@ class Registry(object):
|
||||||
'old': str(registry[name].plugin),
|
'old': str(registry[name].plugin),
|
||||||
'new': str(info.plugin)
|
'new': str(info.plugin)
|
||||||
}
|
}
|
||||||
LOG.warn(_LW('Changing %(name)s from %(old)s to %(new)s'), details)
|
LOG.warning(_LW('Changing %(name)s from %(old)s to %(new)s'),
|
||||||
|
details)
|
||||||
else:
|
else:
|
||||||
LOG.info(_LI('Registering %(name)s -> %(value)s'), {
|
LOG.info(_LI('Registering %(name)s -> %(value)s'), {
|
||||||
'name': name, 'value': str(info.plugin)})
|
'name': name, 'value': str(info.plugin)})
|
||||||
|
|
Loading…
Reference in New Issue