Skip to content

Commit

Permalink
Don't spam the user when no the last hop is not profitable without --…
Browse files Browse the repository at this point in the history
…from
  • Loading branch information
Oliver Smith committed Mar 17, 2015
1 parent b9c6ef2 commit 145caad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion commands/run_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,8 +1016,10 @@ def run(results, cmdenv, tdb):
restrictTo = None
if hopNo == lastHop and stopStations:
restrictTo = set(stopStations)
manualRestriction = bool(cmdenv.destPlace)
elif len(viaSet) > cmdenv.adhocHops:
restrictTo = viaSet
manualRestriction = True

if hopNo >= 1 and cmdenv.maxRoutes or pruneMod:
routes.sort()
Expand Down Expand Up @@ -1053,7 +1055,7 @@ def run(results, cmdenv, tdb):
if not newRoutes:
checkReachability(tdb, cmdenv)
if hopNo > 0:
if restrictTo:
if restrictTo and manualRestriction:
results.summary.exception += routeFailedRestrictions(
tdb, cmdenv, restrictTo, maxLs, hopNo
)
Expand Down

0 comments on commit 145caad

Please sign in to comment.