summaryrefslogtreecommitdiff
path: root/ironic/common/utils.py
diff options
context:
space:
mode:
authorMichael Turek <mjturek@linux.vnet.ibm.com>2017-03-21 09:00:27 -0400
committerMichael Turek <mjturek@linux.vnet.ibm.com>2017-05-15 13:26:58 -0400
commit5777f4ab8c21eb93d720f57a980a594bdda0a8fd (patch)
tree2a00930a6b347f4319a8e5e661eb7f4995412481 /ironic/common/utils.py
parent623eaa01a09723c1d8d4ac894e46c7ad4668aedd (diff)
downloadironic-5777f4ab8c21eb93d720f57a980a594bdda0a8fd.tar.gz
Remove logging translation calls from ironic.common
Removes calls to _LE, _LW, and _LI used for translating logs. There were no _LC calls in this directory. Change-Id: If74114cb5b28bac89ea66ee068799d0a3cea38df Partial-bug: #1674374
Diffstat (limited to 'ironic/common/utils.py')
-rw-r--r--ironic/common/utils.py27
1 files changed, 13 insertions, 14 deletions
diff --git a/ironic/common/utils.py b/ironic/common/utils.py
index ab2788a51..1d1b5a6b1 100644
--- a/ironic/common/utils.py
+++ b/ironic/common/utils.py
@@ -37,7 +37,7 @@ import pytz
import six
from ironic.common import exception
-from ironic.common.i18n import _, _LE, _LW
+from ironic.common.i18n import _
from ironic.conf import CONF
LOG = logging.getLogger(__name__)
@@ -312,7 +312,7 @@ def tempdir(**kwargs):
try:
shutil.rmtree(tmpdir)
except OSError as e:
- LOG.error(_LE('Could not remove tmpdir: %s'), e)
+ LOG.error('Could not remove tmpdir: %s', e)
def rmtree_without_raise(path):
@@ -320,7 +320,7 @@ def rmtree_without_raise(path):
if os.path.isdir(path):
shutil.rmtree(path)
except OSError as e:
- LOG.warning(_LW("Failed to remove dir %(path)s, error: %(e)s"),
+ LOG.warning("Failed to remove dir %(path)s, error: %(e)s",
{'path': path, 'e': e})
@@ -336,10 +336,9 @@ def create_link_without_raise(source, link):
if e.errno == errno.EEXIST:
return
else:
- LOG.warning(
- _LW("Failed to create symlink from %(source)s to %(link)s"
- ", error: %(e)s"),
- {'source': source, 'link': link, 'e': e})
+ LOG.warning("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):
@@ -351,9 +350,9 @@ def safe_rstrip(value, chars=None):
"""
if not isinstance(value, six.string_types):
- LOG.warning(_LW("Failed to remove trailing character. Returning "
- "original object. Supplied object is not a string: "
- "%s,"), value)
+ LOG.warning("Failed to remove trailing character. Returning "
+ "original object. Supplied object is not a string: "
+ "%s,", value)
return value
return value.rstrip(chars) or value
@@ -544,7 +543,7 @@ def warn_about_deprecated_extra_vif_port_id():
global warn_deprecated_extra_vif_port_id
if not warn_deprecated_extra_vif_port_id:
warn_deprecated_extra_vif_port_id = True
- LOG.warning(_LW("Attaching VIF to a port/portgroup via "
- "extra['vif_port_id'] is deprecated and will not "
- "be supported in Pike release. API endpoint "
- "v1/nodes/<node>/vifs should be used instead."))
+ LOG.warning("Attaching VIF to a port/portgroup via "
+ "extra['vif_port_id'] is deprecated and will not "
+ "be supported in Pike release. API endpoint "
+ "v1/nodes/<node>/vifs should be used instead.")