Exception raised when pytz is passed an unknown timezone. >>> isinstance(UnknownTimeZoneError(), LookupError) True This class is actually a subclass of KeyError to provide backwards compatibility with code relying on the undocumented behavior of earlier pytz releases. >>>
| 13 | |
| 14 | |
| 15 | class UnknownTimeZoneError(KeyError, Error): |
| 16 | '''Exception raised when pytz is passed an unknown timezone. |
| 17 | |
| 18 | >>> isinstance(UnknownTimeZoneError(), LookupError) |
| 19 | True |
| 20 | |
| 21 | This class is actually a subclass of KeyError to provide backwards |
| 22 | compatibility with code relying on the undocumented behavior of earlier |
| 23 | pytz releases. |
| 24 | |
| 25 | >>> isinstance(UnknownTimeZoneError(), KeyError) |
| 26 | True |
| 27 | |
| 28 | And also a subclass of pytz.exceptions.Error, as are other pytz |
| 29 | exceptions. |
| 30 | |
| 31 | >>> isinstance(UnknownTimeZoneError(), Error) |
| 32 | True |
| 33 | |
| 34 | ''' |
| 35 | pass |
| 36 | |
| 37 | |
| 38 | class InvalidTimeError(Error): |