MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / UnknownTimeZoneError

Class UnknownTimeZoneError

tests/test_code/py/pytz/exceptions.py:15–35  ·  view source on GitHub ↗

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. >>>

Source from the content-addressed store, hash-verified

13
14
15class 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
38class InvalidTimeError(Error):

Callers 1

timezoneFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected