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: I5130cd6d620881c190297f6fe300def7d6037fce Closes-Bug: #1530742
This commit is contained in:
parent
9513a2ac92
commit
b2bc9dde6f
@ -264,7 +264,7 @@ def _log_warnings(resp):
|
||||
for msg in (resp['info'], resp['node'], resp['data']):
|
||||
msgstr = str(msg)
|
||||
if 'warn' in msgstr.lower():
|
||||
LOG.warn(_("Warning from xCAT: %s") % msgstr)
|
||||
LOG.warning(_("Warning from xCAT: %s") % msgstr)
|
||||
|
||||
|
||||
def _is_warning(err_str):
|
||||
|
Loading…
x
Reference in New Issue
Block a user