Skip to content

Commit

Permalink
Fixed station argument for shipvendor
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Jan 26, 2015
1 parent 5102470 commit 3421624
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions commands/shipvendor_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
epilog=None
arguments = [
ParseArgument(
'station',
'origin',
help='Specify the full name of the station (SYS NAME/STN NAME is also supported).',
metavar='STATIONNAME',
type=str,
Expand Down Expand Up @@ -119,10 +119,11 @@ def checkShipPresent(tdb, ship, station):

def run(results, cmdenv, tdb):

try:
station = tdb.lookupStation(cmdenv.station)
except LookupError:
raise CommandLineError("Unrecognized Station: {}".format(cmdenv.station))
station = cmdenv.startStation
if not isinstance(station, Station):
raise CommandLineError("{} is a system, not a station".format(
station.name()
))

try:
ship = tdb.lookupShip(cmdenv.ship)
Expand Down

0 comments on commit 3421624

Please sign in to comment.