]> granicus.if.org Git - python/commitdiff
#19855: restore use of LC_ALL, not LC_MESSAGES
authorR David Murray <rdmurray@bitdance.com>
Sat, 18 Jan 2014 19:56:10 +0000 (14:56 -0500)
committerR David Murray <rdmurray@bitdance.com>
Sat, 18 Jan 2014 19:56:10 +0000 (14:56 -0500)
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.

Lib/uuid.py

index 7705a8ad409d56c75bfb09c7b0fd2293c0c84386..9946042c298c2efcbac617eb4d4e251bedeca56e 100644 (file)
@@ -321,9 +321,9 @@ def _find_mac(command, args, hw_identifiers, get_index):
             return None
 
     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
-        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:
             for line in pipe:
                 words = line.lower().split()