mirror of
https://github.com/python/cpython.git
synced 2025-09-06 08:51:39 +00:00
#19855: restore use of LC_ALL, not LC_MESSAGES
I didn't realize LC_ALL was an override, and I should have. I tried to make a test, but it is not clear that the LC variables actually affect the strings that uuid is using to parse the command output.
This commit is contained in:
parent
ff97b08d00
commit
4295353568
1 changed files with 2 additions and 2 deletions
|
@ -321,9 +321,9 @@ def _find_mac(command, args, hw_identifiers, get_index):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# LC_MESSAGES to get English output, 2>/dev/null to
|
# LC_ALL to ensure English output, 2>/dev/null to
|
||||||
# prevent output on stderr
|
# prevent output on stderr
|
||||||
cmd = 'LC_MESSAGES=C %s %s 2>/dev/null' % (executable, args)
|
cmd = 'LC_ALL=C %s %s 2>/dev/null' % (executable, args)
|
||||||
with os.popen(cmd) as pipe:
|
with os.popen(cmd) as pipe:
|
||||||
for line in pipe:
|
for line in pipe:
|
||||||
words = line.lower().split()
|
words = line.lower().split()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue