Skip to content

Commit

Permalink
fix: wrong algorithm in cleanup extra result
Browse files Browse the repository at this point in the history
  • Loading branch information
xhdix committed Mar 6, 2022
1 parent 2f3b409 commit a2423d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/traceroute_struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ def clean_extra_result(self):
for try_step in self.result: # will be up to 255
results = try_step["result"]
repeat_steps = 0
for result in results: # will be up to 3
for result in results: # will be unknown
if "x" in result.keys():
if '-' == result["x"]:
repeat_steps += 1
if repeat_steps == 3:
if repeat_steps == len(results):
del self.result[result_index:]
break
result_index += 1
Expand Down

0 comments on commit a2423d2

Please sign in to comment.