Skip to content

Commit

Permalink
friendly error when specifying a system instead of a station
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Feb 11, 2015
1 parent 41d215e commit 71192ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions commands/station_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ def checkSystemAndStation(tdb, cmdenv):
raise CommandLineError("Unrecognized Station: {}".format(
cmdenv.station
))
if not isinstance(station, Station):
raise CommandLineError(
"Expecting a STATION, got {}".format(stnName)
)
cmdenv.system = station.system.name()
cmdenv.station = station.dbname

Expand Down

0 comments on commit 71192ac

Please sign in to comment.