Add error catching to locale.getlocale(locale.LC_ALL, "")#747
Add error catching to locale.getlocale(locale.LC_ALL, "")#747lordwelch merged 6 commits intocomictagger:developfrom N-Hertstein:develop
Conversation
Add error handling and fallbacks to en_US or C as language locale in case of misconfigured or minimal system.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
I don't know how possible it is but what if |
Modify fallback languages from en_US.UTF-8 & C.UTF-8 to en_US & C to avoid errors when UTF-8 is not available.
That would be better, fixed it. |
|
What I mean is it's not known what will be on the system. So either the locales need to be interrogated and one picked or the best option might be to |
lordwelch
left a comment
There was a problem hiding this comment.
Only use C as a fallback it will always exist and log that it's falling back to C logger.error("Couldn't set the locale: unsupported locale setting; falling back to 'C' locale")
Skip falling back to en_US and go straight to C as it is always available. Add error logging.
Added as requested |
Add error handling and fallbacks to en_US or C as language locale in case of misconfigured or minimal system.
Fixes issue #740