Skip to content

Commit

Permalink
Small fix to major route crawler.
Browse files Browse the repository at this point in the history
  • Loading branch information
djgroen committed Nov 21, 2024
1 parent e64abd8 commit e16b755
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flee/crawling.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ def insertAllMajorRoutesAtLocation(l, time: int):
# get list of destination location routes (l.routes[name][1])
dest_list = compileDestList(l)

# Storing current route names before major loop additions, because l.routes
# itself will be expanded with major routes during the iterations.
route_names = list(l.routes.keys()).copy()

# Check for major routes from current location.
if len(l.major_routes) > 0:
#print(f"Adding major route in curloc: {l.name}, {l.routes}, {l.major_routes}.", file=sys.stderr)
Expand All @@ -222,10 +226,6 @@ def insertAllMajorRoutesAtLocation(l, time: int):
# Check for major routes from all other locations reachable
# with regular routes.

# Storing current route names before the loop, because l.routes
# itself will be expanded with major routes during the iterations.
route_names = list(l.routes.keys()).copy()

# Main loop over regular routes.
for route_name in route_names:
loc = l.routes[route_name][2]
Expand Down

0 comments on commit e16b755

Please sign in to comment.