Class method used to query whether or not this class allows time zone changes.
(cls)
| 185 | |
| 186 | @classmethod |
| 187 | def tz_change_allowed(cls): |
| 188 | """ |
| 189 | Class method used to query whether or not this class allows time zone |
| 190 | changes. |
| 191 | """ |
| 192 | guard = bool(os.environ.get(cls._guard_var_name, False)) |
| 193 | |
| 194 | # _guard_allows_change gives the "default" behavior - if True, the |
| 195 | # guard is overcoming a block. If false, the guard is causing a block. |
| 196 | # Whether tz_change is allowed is therefore the XNOR of the two. |
| 197 | return guard == cls._guard_allows_change |
| 198 | |
| 199 | @classmethod |
| 200 | def tz_change_disallowed_message(cls): |