Skip to content

Commit

Permalink
Merge pull request iovisor#685 from kinvolk/iaguis/fix-indentation
Browse files Browse the repository at this point in the history
examples: fix indentation in tracing/tcpv4connect
  • Loading branch information
brendangregg committed Sep 8, 2016
2 parents 4c2b538 + 5bd242c commit deaeabb
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions examples/tracing/tcpv4connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,17 @@ def inet_ntoa(addr):

# filter and format output
while 1:
# Read messages from kernel pipe
try:
(task, pid, cpu, flags, ts, msg) = b.trace_fields()
(_tag, saddr_hs, daddr_hs, dport_s) = msg.split(" ")
except ValueError:
# Ignore messages from other tracers
continue

# Ignore messages from other tracers
if _tag != "trace_tcp4connect":
continue
# Read messages from kernel pipe
try:
(task, pid, cpu, flags, ts, msg) = b.trace_fields()
(_tag, saddr_hs, daddr_hs, dport_s) = msg.split(" ")
except ValueError:
# Ignore messages from other tracers
continue

# Ignore messages from other tracers
if _tag != "trace_tcp4connect":
continue

print("%-6d %-12.12s %-16s %-16s %-4s" % (pid, task,
inet_ntoa(int(saddr_hs, 16)),
Expand Down

0 comments on commit deaeabb

Please sign in to comment.