File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -378,11 +378,14 @@ def setUpClass(cls):
378378 def get_readelf_version ():
379379 try :
380380 cmd = ["readelf" , "--version" ]
381+ # Force the C locale to disable localization.
382+ env = dict (os .environ , LC_ALL = "C" )
381383 proc = subprocess .Popen (
382384 cmd ,
383385 stdout = subprocess .PIPE ,
384386 stderr = subprocess .PIPE ,
385387 universal_newlines = True ,
388+ env = env ,
386389 )
387390 with proc :
388391 version , stderr = proc .communicate ()
@@ -427,11 +430,14 @@ def get_readelf_output(self):
427430 break
428431
429432 command = ["readelf" , "-n" , binary ]
433+ # Force the C locale to disable localization.
434+ env = dict (os .environ , LC_ALL = "C" )
430435 stdout , _ = subprocess .Popen (
431436 command ,
432437 stdout = subprocess .PIPE ,
433438 stderr = subprocess .STDOUT ,
434439 universal_newlines = True ,
440+ env = env ,
435441 ).communicate ()
436442 return stdout
437443
You can’t perform that action at this time.
0 commit comments