Merge "Adding the appropriate log hints where needed"

This commit is contained in:
Jenkins 2016-07-02 02:50:05 +00:00 committed by Gerrit Code Review
commit 3f41375778
2 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@ from oslo_utils import timeutils
import ryu.app.ofctl.api as ofctl_api
import ryu.exception as ryu_exc
from neutron._i18n import _LE, _LW
from neutron._i18n import _, _LW
LOG = logging.getLogger(__name__)
@ -57,7 +57,7 @@ class OpenFlowSwitchMixin(object):
# The switch has not established a connection to us.
# Wait for a little.
if timeutils.now() > start_time + timeout_sec:
m = _LE("Switch connection timeout")
m = _("Switch connection timeout")
LOG.error(m)
# NOTE(yamamoto): use RuntimeError for compat with ovs_lib
raise RuntimeError(m)
@ -70,7 +70,7 @@ class OpenFlowSwitchMixin(object):
try:
result = ofctl_api.send_msg(self._app, msg, reply_cls, reply_multi)
except ryu_exc.RyuException as e:
m = _LE("ofctl request %(request)s error %(error)s") % {
m = _("ofctl request %(request)s error %(error)s") % {
"request": msg,
"error": e,
}
@ -81,7 +81,7 @@ class OpenFlowSwitchMixin(object):
with excutils.save_and_reraise_exception() as ctx:
if e is timeout:
ctx.reraise = False
m = _LE("ofctl request %(request)s timed out") % {
m = _("ofctl request %(request)s timed out") % {
"request": msg,
}
LOG.error(m)

View File

@ -20,7 +20,7 @@ from oslo_utils import excutils
from oslo_utils import importutils
import six
from neutron._i18n import _, _LE, _LI
from neutron._i18n import _LE, _LI
from neutron.api import extensions
from neutron.db import servicetype_db as sdb
from neutron.services import provider_configuration as pconf
@ -61,7 +61,7 @@ def load_drivers(service_type, plugin):
filters={'service_type': [service_type]})
)
if not providers:
msg = (_("No providers specified for '%s' service, exiting") %
msg = (_LE("No providers specified for '%s' service, exiting") %
service_type)
LOG.error(msg)
raise SystemExit(1)