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: I912333466ac65aa3ad06732f3a16e7130b21e282 Closes-Bug: #1530742
This commit is contained in:
parent
a63ba0d587
commit
771402f2e9
@ -112,9 +112,9 @@ def tables(output_lines):
|
|||||||
if label is None:
|
if label is None:
|
||||||
label = line
|
label = line
|
||||||
else:
|
else:
|
||||||
LOG.warn('Invalid line between tables: %s' % line)
|
LOG.warning('Invalid line between tables: %s' % line)
|
||||||
if len(table_) > 0:
|
if len(table_) > 0:
|
||||||
LOG.warn('Missing end of table')
|
LOG.warning('Missing end of table')
|
||||||
|
|
||||||
return tables_
|
return tables_
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ def table(output_lines):
|
|||||||
columns = _table_columns(line)
|
columns = _table_columns(line)
|
||||||
continue
|
continue
|
||||||
if '|' not in line:
|
if '|' not in line:
|
||||||
LOG.warn('skipping invalid table line: %s' % line)
|
LOG.warning('skipping invalid table line: %s' % line)
|
||||||
continue
|
continue
|
||||||
row = []
|
row = []
|
||||||
for col in columns:
|
for col in columns:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user