From 71192ac800bd918a3ba883a61222186d6e9ef321 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Tue, 10 Feb 2015 21:16:32 -0800 Subject: [PATCH] friendly error when specifying a system instead of a station --- commands/station_cmd.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands/station_cmd.py b/commands/station_cmd.py index 7775f8d8..fb7af3db 100644 --- a/commands/station_cmd.py +++ b/commands/station_cmd.py @@ -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