From cccd78f8d185900f6f18e1491dddedeca50185aa Mon Sep 17 00:00:00 2001 From: Dongcan Ye Date: Mon, 25 Jan 2016 11:38:52 +0800 Subject: [PATCH] Replace exit() by sys.exit() exit() is used for interactive shell, it relies on the site module. sys.exit() is considered good to use in programs. Trivial-fix Change-Id: Ic34e137a4f1d116a63f50a56ee6b3b2d5efa6d97 --- .../ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py | 2 +- .../plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py b/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py index ee95c2e3e98..eeff3dc97bb 100644 --- a/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py +++ b/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py @@ -889,7 +889,7 @@ class LinuxBridgeNeutronAgentRPC(service.Service): else: LOG.error(_LE("Unable to obtain MAC address for unique ID. " "Agent terminated!")) - exit(1) + sys.exit(1) self.plugin_rpc = agent_rpc.PluginApi(topics.PLUGIN) self.sg_plugin_rpc = sg_rpc.SecurityGroupServerRpcApi(topics.PLUGIN) diff --git a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py index fde43d5f440..897774ea35f 100644 --- a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py +++ b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py @@ -1016,7 +1016,7 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin, "tunneling enabled on this agent, since this " "version of OVS does not support tunnels or patch " "ports. Agent terminated!")) - exit(1) + sys.exit(1) if self.conf.AGENT.drop_flows_on_start: self.tun_br.delete_flows()