From: Gary Kotton Date: Sun, 8 Nov 2015 07:47:48 +0000 (-0800) Subject: Do not use log hints for exceptions X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=7bd8b4beeedbef5b196ce8127c172476d775cefc;p=openstack-build%2Fneutron-build.git Do not use log hints for exceptions A log hint should not be used for an exception. Please see http://docs.openstack.org/developer/oslo.i18n/guidelines.html Change-Id: I122455fd767c21e26c34e23b8b7d45b845f15e99 --- diff --git a/neutron/agent/ovsdb/native/commands.py b/neutron/agent/ovsdb/native/commands.py index beb185a58..2ed585763 100644 --- a/neutron/agent/ovsdb/native/commands.py +++ b/neutron/agent/ovsdb/native/commands.py @@ -92,7 +92,7 @@ class DelBridgeCommand(BaseCommand): if self.if_exists: return else: - msg = _LE("Bridge %s does not exist") % self.name + msg = _("Bridge %s does not exist") % self.name LOG.error(msg) raise RuntimeError(msg) self.api._ovs.verify('bridges') @@ -320,7 +320,7 @@ class DelPortCommand(BaseCommand): except idlutils.RowNotFound: if self.if_exists: return - msg = _LE("Port %s does not exist") % self.port + msg = _("Port %s does not exist") % self.port raise RuntimeError(msg) if self.bridge: br = idlutils.row_by_value(self.api.idl, 'Bridge', 'name', @@ -331,7 +331,7 @@ class DelPortCommand(BaseCommand): if port.uuid not in br.ports and not self.if_exists: # TODO(twilson) Make real errors across both implementations - msg = _LE("Port %(port)s does not exist on %(bridge)s!") % { + msg = _("Port %(port)s does not exist on %(bridge)s!") % { 'port': self.name, 'bridge': self.bridge } LOG.error(msg) @@ -425,7 +425,7 @@ class DbListCommand(BaseCommand): # NOTE(kevinbenton): this is converted to a RuntimeError # for compat with the vsctl version. It might make more # sense to change this to a RowNotFoundError in the future. - raise RuntimeError(_LE( + raise RuntimeError(_( "Row doesn't exist in the DB. Request info: " "Table=%(table)s. Columns=%(columns)s. " "Records=%(records)s.") % {