Merge "Change LOG.warn to LOG.warning"

This commit is contained in:
Jenkins 2016-01-05 06:15:49 +00:00 committed by Gerrit Code Review
commit 880d57969b

@ -442,8 +442,8 @@ def unlink_without_raise(path):
if e.errno == errno.ENOENT:
return
else:
LOG.warn(_LW("Failed to unlink %(path)s, error: %(e)s"),
{'path': path, 'e': e})
LOG.warning(_LW("Failed to unlink %(path)s, error: %(e)s"),
{'path': path, 'e': e})
def rmtree_without_raise(path):
@ -451,8 +451,8 @@ def rmtree_without_raise(path):
if os.path.isdir(path):
shutil.rmtree(path)
except OSError as e:
LOG.warn(_LW("Failed to remove dir %(path)s, error: %(e)s"),
{'path': path, 'e': e})
LOG.warning(_LW("Failed to remove dir %(path)s, error: %(e)s"),
{'path': path, 'e': e})
def write_to_file(path, contents):
@ -467,9 +467,9 @@ def create_link_without_raise(source, link):
if e.errno == errno.EEXIST:
return
else:
LOG.warn(_LW("Failed to create symlink from %(source)s to %(link)s"
", error: %(e)s"),
{'source': source, 'link': link, 'e': e})
LOG.warning(_LW("Failed to create symlink from %(source)s to "
"%(link)s, error: %(e)s"),
{'source': source, 'link': link, 'e': e})
def safe_rstrip(value, chars=None):
@ -481,8 +481,9 @@ def safe_rstrip(value, chars=None):
"""
if not isinstance(value, six.string_types):
LOG.warn(_LW("Failed to remove trailing character. Returning original "
"object. Supplied object is not a string: %s,"), value)
LOG.warning(_LW("Failed to remove trailing character. Returning "
"original object. Supplied object is not a string: "
"%s,"), value)
return value
return value.rstrip(chars) or value