Skip to content

Commit

Permalink
Merged kfsone/tradedangerous into master
Browse files Browse the repository at this point in the history
  • Loading branch information
maddavo committed May 2, 2015
2 parents ab41831 + b319f07 commit 3d4d9e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions commands/run_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,6 @@ def checkDestinations(tdb, cmdenv, calc):
raise CommandLineError("--end-jumps (-e) only works with --to")
cmdenv.DEBUG0("Using all available destinations")
if cmdenv.goalSystem:
if not cmdenv.origPlace:
raise CommandLineError("--towards requires --from")
dest = tdb.lookupPlace(cmdenv.goalSystem)
cmdenv.goalSystem = dest.system

Expand Down Expand Up @@ -811,6 +809,9 @@ def validateRunArguments(tdb, cmdenv, calc):
"--shorten only works with --to."
)

if cmdenv.goalSystem and not cmdenv.origPlace:
raise CommandLineError("--towards requires --from")

checkOrigins(tdb, cmdenv, calc)
checkDestinations(tdb, cmdenv, calc)

Expand Down
2 changes: 1 addition & 1 deletion tradecalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ def station_iterator(srcStation):
unique = bool(tdenv.unique)
if bool(tdenv.unique):
stations = (
d for d in stations if d.system is not SrcSystem
d for d in stations if d.system is not srcSystem
)
stations = (
d for d in stations
Expand Down

0 comments on commit 3d4d9e3

Please sign in to comment.