misc: ignore exceptions when trying to set locale

This commit is contained in:
Peter F. Patel-Schneider 2020-08-06 13:12:45 -04:00
parent eda0a95585
commit 5117028c52
1 changed files with 5 additions and 1 deletions

View File

@ -47,7 +47,11 @@ def _find_locale_path(lc_domain):
# del _path
locale.setlocale(locale.LC_ALL, '')
try:
locale.setlocale(locale.LC_ALL, '')
except Exception:
pass
language, encoding = locale.getlocale()
del locale