Skip to content

Commit

Permalink
examples: fix indentation in tracing/tcpv4connect
Browse files Browse the repository at this point in the history
Python doesn't like mixing spaces and tabs.
  • Loading branch information
iaguis committed Sep 8, 2016
1 parent 4c2b538 commit 5bd242c
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 5bd242c

Please sign in to comment.