Message ID | 1479115454-48163-2-git-send-email-nic@opencloud.tech |
---|---|
State | Accepted |
Headers | show |
nickcooper-zhangtonghao <nic@opencloud.tech> writes: > When using ovs-tcpdump, we always get the white line. > Remove newline from readline() and ovs-tcpdump will > format the output as tcpdump tool. > > Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech> > --- I acked this with V1, so: Acked-by: Aaron Conole <aconole@redhat.com>
diff --git a/utilities/ovs-tcpdump.in b/utilities/ovs-tcpdump.in index b29e691..01e1f6d 100755 --- a/utilities/ovs-tcpdump.in +++ b/utilities/ovs-tcpdump.in @@ -426,7 +426,7 @@ def main(): pipes = _doexec(*([dump_cmd, '-i', mirror_interface] + tcpdargs)) try: while pipes.poll() is None: - data = pipes.stdout.readline() + data = pipes.stdout.readline().strip('\n') if len(data) == 0: raise KeyboardInterrupt print(data)
When using ovs-tcpdump, we always get the white line. Remove newline from readline() and ovs-tcpdump will format the output as tcpdump tool. Signed-off-by: nickcooper-zhangtonghao <nic@opencloud.tech> --- utilities/ovs-tcpdump.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)