diff --git a/neutron/agent/linux/utils.py b/neutron/agent/linux/utils.py index b3a44a9fbf6..e29c770d61d 100644 --- a/neutron/agent/linux/utils.py +++ b/neutron/agent/linux/utils.py @@ -35,7 +35,6 @@ from oslo_utils import excutils from oslo_utils import fileutils import psutil -from neutron._i18n import _ from neutron.common import utils from neutron.conf.agent import common as config from neutron.privileged.agent.linux import utils as priv_utils @@ -142,7 +141,7 @@ def execute(cmd, process_input=None, addl_env=None, if log_fail_as_error: LOG.error(msg) if check_exit_code: - raise exceptions.ProcessExecutionError(_(msg), + raise exceptions.ProcessExecutionError(msg, returncode=returncode) finally: # NOTE(termie): this appears to be necessary to let the subprocess diff --git a/neutron/agent/windows/utils.py b/neutron/agent/windows/utils.py index 0658e3155b3..adf76b2877b 100644 --- a/neutron/agent/windows/utils.py +++ b/neutron/agent/windows/utils.py @@ -25,8 +25,6 @@ from neutron_lib.utils import helpers from oslo_log import log as logging from oslo_utils import encodeutils -from neutron._i18n import _ - if os.name == 'nt': import wmi @@ -133,7 +131,7 @@ def execute(cmd, process_input=None, addl_env=None, LOG.debug(log_msg) if obj.returncode and check_exit_code: - raise exceptions.ProcessExecutionError(_(m), returncode=obj.returncode) + raise exceptions.ProcessExecutionError(m, returncode=obj.returncode) return (_stdout, _stderr) if return_stderr else _stdout