Change _ to _LW for LOG.warning
log warning msg with _LW(), to support i18n translation. Change-Id: I1cef1c660237ff1dc34ca7c004f8d77af488f4d1
This commit is contained in:
parent
1c85e84a73
commit
3980ae15c7
@ -16,7 +16,7 @@
|
||||
import collections
|
||||
import threading
|
||||
|
||||
from rally.common.i18n import _
|
||||
from rally.common.i18n import _LW
|
||||
from rally.common import logging
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ def _consumer(consume, queue):
|
||||
try:
|
||||
consume(cache, args)
|
||||
except Exception as e:
|
||||
LOG.warning(_("Failed to consume a task from the queue: %s") % e)
|
||||
LOG.warning(_LW("Failed to consume a task from the queue: %s") % e)
|
||||
if logging.is_debug():
|
||||
LOG.exception(e)
|
||||
|
||||
@ -56,7 +56,7 @@ def _publisher(publish, queue):
|
||||
try:
|
||||
publish(queue)
|
||||
except Exception as e:
|
||||
LOG.warning(_("Failed to publish a task to the queue: %s") % e)
|
||||
LOG.warning(_LW("Failed to publish a task to the queue: %s") % e)
|
||||
if logging.is_debug():
|
||||
LOG.exception(e)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user