| 1 | class MeteoclimaticError(Exception): |
| 2 | """Generic base class for Meteoclimatic exceptions""" |
| 3 | pass |
| 4 | |
| 5 | |
| 6 | class StationNotFound(MeteoclimaticError): |
| 7 | """Raised when the station code yields no Meteoclimatic station""" |
| 8 | |
| 9 | def __init__(self, station_code): |
| 10 | self.station_code = station_code |
| 11 | super().__init__("Station code %s did not return any item" % (station_code, )) |