Kaydet (Commit) bbf18bee authored tarafından R David Murray's avatar R David Murray

Merge #19855: restore use of LC_ALL, not LC_MESSAGES

...@@ -321,9 +321,10 @@ def _find_mac(command, args, hw_identifiers, get_index): ...@@ -321,9 +321,10 @@ 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
# prevent output on stderr # stderr (Note: we don't have an example where the words we search for
cmd = 'LC_MESSAGES=C %s %s 2>/dev/null' % (executable, args) # are actually localized, but in theory some system could do so.)
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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment