[ovs-dev] [PATCH 3/4] ovs-tcpdump: Fix error handling when parsing parameter.
nickcooper-zhangtonghao
nic at opencloud.tech
Mon Nov 7 17:06:50 UTC 2016
Signed-off-by: nickcooper-zhangtonghao <nic at opencloud.tech>
---
utilities/ovs-tcpdump.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in
index c189bc8..d03568d 100755
--- a/utilities/ovs-tcpdump.in
+++ b/utilities/ovs-tcpdump.in
@@ -432,9 +432,12 @@ def main():
print(data)
raise KeyboardInterrupt
except KeyboardInterrupt:
- pipes.terminate()
+ if pipes.poll() is None:
+ pipes.terminate()
+
ovsdb.destroy_mirror('m%s' % interface, ovsdb.port_bridge(interface))
ovsdb.destroy_port(mirror_interface, ovsdb.port_bridge(interface))
+ sys.exit(1)
except Exception:
print("Unable to tear down the ports and mirrors.")
print("Please use ovs-vsctl to remove the ports and mirrors created.")
--
1.8.3.1
More information about the dev
mailing list