]> git.proxmox.com Git - ovs.git/commitdiff
ovs-tcpdump: Fix error handling when parsing parameter.
authornickcooper-zhangtonghao <nic@opencloud.tech>
Mon, 14 Nov 2016 09:24:14 +0000 (01:24 -0800)
committerBen Pfaff <blp@ovn.org>
Tue, 22 Nov 2016 23:14:07 +0000 (15:14 -0800)
Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
utilities/ovs-tcpdump.in

index 96aa1e278c111f79968ae821febc13dda56fbef7..d984a39386511b290a5e40e71e51ce8da622f434 100755 (executable)
@@ -433,7 +433,9 @@ def main():
             print(data)
         raise KeyboardInterrupt
     except KeyboardInterrupt:
-        pipes.terminate()
+        if pipes.poll() is None:
+            pipes.terminate()
+
         ovsdb.destroy_mirror(interface, ovsdb.port_bridge(interface))
         ovsdb.destroy_port(mirror_interface, ovsdb.port_bridge(interface))
     except Exception: