Drop fallback to deprecated locale.getdefaultlocale

This API was deprecated in Python 3.11 [1].

[1] https://docs.python.org/3/library/locale.html#locale.getdefaultlocale

Change-Id: I6c42b83f4cb347b4f4ef913b13adcfbee7db1de8
This commit is contained in:
Takashi Kajinami
2025-06-17 00:01:39 +09:00
parent 32af0d599b
commit f7e7bf6922

View File

@ -230,8 +230,6 @@ class Client(ssh.Client):
# Update local environment
lang, encoding = locale.getlocale()
if not lang:
lang, encoding = locale.getdefaultlocale()
_locale = '.'.join([lang, encoding])
channel.update_environment({'LC_ALL': _locale,
'LANG': _locale})