Skip to content

Commit

Permalink
Fix for --to breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Smith committed Jan 9, 2015
1 parent 479f8aa commit 79b5ec5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tradecalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,11 +599,12 @@ def getBestHops(self, routes, restrictTo=None):

restrictStations = set()
if restrictTo:
for place in restrictStations:
for place in restrictTo:
if isinstance(place, Station):
restrictStations.add(place)
elif isinstance(place, System) and place.stations:
restrictStations += place.stations
restrictStations = set(restrictStations)

for route in routes:
tdenv.DEBUG1("Route = {}", route.str())
Expand Down

0 comments on commit 79b5ec5

Please sign in to comment.