...
This commit is contained in:
parent
f3c96f308d
commit
0f734719e7
@ -338,11 +338,11 @@ def set_locale() -> None:
|
|||||||
locale.setlocale(locale.LC_ALL, '')
|
locale.setlocale(locale.LC_ALL, '')
|
||||||
except Exception:
|
except Exception:
|
||||||
log_error('Failed to set locale with LANG:', os.environ.get('LANG'))
|
log_error('Failed to set locale with LANG:', os.environ.get('LANG'))
|
||||||
os.environ.pop('LANG', None)
|
if os.environ.pop('LANG', None) is not None:
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_ALL, '')
|
locale.setlocale(locale.LC_ALL, '')
|
||||||
except Exception:
|
except Exception:
|
||||||
log_error('Failed to set locale with no LANG')
|
log_error('Failed to set locale with no LANG')
|
||||||
|
|
||||||
|
|
||||||
def _main() -> None:
|
def _main() -> None:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user