Replace deprecated LOG.warn with LOG.warning

Change-Id: Ib3d566f6e608ee453659e15cabcf8e9332aedc52
Closes-Bug: #1508442
This commit is contained in:
Zhenguo Niu
2015-10-22 14:36:30 +08:00
parent f042be51f4
commit 18d5d6aba3
2 changed files with 8 additions and 8 deletions
ironic_python_agent

@ -399,7 +399,7 @@ class GenericHardwareManager(HardwareManager):
out, _e = utils.execute("dmidecode --type memory | grep Size",
shell=True)
except (processutils.ProcessExecutionError, OSError) as e:
LOG.warn("Cannot get real physical memory size: %s", e)
LOG.warning("Cannot get real physical memory size: %s", e)
physical = None
else:
physical = 0
@ -416,8 +416,8 @@ class GenericHardwareManager(HardwareManager):
line, exc)
if not physical:
LOG.warn('failed to get real physical RAM, dmidecode returned '
'%s', out)
LOG.warning('failed to get real physical RAM, dmidecode '
'returned %s', out)
return Memory(total=total, physical_mb=physical)
@ -601,7 +601,7 @@ class GenericHardwareManager(HardwareManager):
"| awk '{ print $4 }'", shell=True)
except (processutils.ProcessExecutionError, OSError) as e:
# Not error, because it's normal in virtual environment
LOG.warn("Cannot get BMC address: %s", e)
LOG.warning("Cannot get BMC address: %s", e)
return
return out.strip()