core.time: hotfix for default force_abbreviations attribute
This commit is contained in:
parent
6a6d157040
commit
a8f86e32b9
1 changed files with 2 additions and 2 deletions
|
@ -11,11 +11,11 @@ def user_forced() -> Sequence[str]:
|
||||||
# https://stackoverflow.com/questions/36067621/python-all-possible-timezone-abbreviations-for-given-timezone-name-and-vise-ve
|
# https://stackoverflow.com/questions/36067621/python-all-possible-timezone-abbreviations-for-given-timezone-name-and-vise-ve
|
||||||
try:
|
try:
|
||||||
from my.config import time as user_config
|
from my.config import time as user_config
|
||||||
|
return user_config.tz.force_abbreviations # type: ignore[attr-defined] # noqa: TRY300
|
||||||
|
# note: noqa since we're catching case where config doesn't have attribute here as well
|
||||||
except:
|
except:
|
||||||
# todo log/apply policy
|
# todo log/apply policy
|
||||||
return []
|
return []
|
||||||
else:
|
|
||||||
return user_config.tz.force_abbreviations # type: ignore[attr-defined]
|
|
||||||
|
|
||||||
|
|
||||||
@lru_cache(1)
|
@lru_cache(1)
|
||||||
|
|
Loading…
Add table
Reference in a new issue