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:
zhangguoqing 2016-01-04 12:58:07 +00:00
parent 9513a2ac92
commit b2bc9dde6f
1 changed files with 1 additions and 1 deletions

View File

@ -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):