diff --git a/renderer.py b/renderer.py index 7670564..7153c4f 100644 --- a/renderer.py +++ b/renderer.py @@ -767,25 +767,30 @@ def render_routes(): for route_check in all_routes["routes"]: # ... that aren't exit routes... if prefix !="0.0.0.0/0" and prefix !="::/0": - # if the curren route matches any prefix of any route... + # if the curren route matches any prefix of any other route... if route["prefix"] == route_check["prefix"]: - # and the route ID's are different + # and the route ID's are different ... if route["id"] != route_check["id"]: - # If they are, append the prefix to the failover_route_prefix list - failover_route_prefix.append(prefix) + # ... and the prefix is not already in the list... + if route["prefix"] not in failover_route_prefix: + # append the prefix to the failover_route_prefix list + failover_route_prefix.append(prefix) # Build the display for failover routes: for route_prefix in failover_route_prefix: # Get all route_id's associated with the route prefix: - failover_content += """
+
| Machine | +Enabled | +Primary | +
|---|