Skip to content

Commit

Permalink
Fix how we debug routes
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Apr 30, 2015
1 parent 8a2b0be commit 5c8037c
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions tradecalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,17 +839,16 @@ def station_iterator(srcStation):
)

if tdenv.debug >= 1:
def annotate():
for dest in stations:
tdenv.DEBUG1(
"destSys {}, destStn {}, jumps {}, distLy {}",
dest.system.dbname,
dest.station.dbname,
"->".join(jump.str() for jump in dest.via),
dest.distLy
)
yield dest
stations = iter(annotate())
def annotate(dest):
tdenv.DEBUG1(
"destSys {}, destStn {}, jumps {}, distLy {}",
dest.system.dbname,
dest.station.dbname,
"->".join(jump.str() for jump in dest.via),
dest.distLy
)
return True
stations = (d for d in stations if annotate(d))

for dest in stations:
dstStation = dest.station
Expand Down

0 comments on commit 5c8037c

Please sign in to comment.