[util/cli] make sure language is set to "C"
to make parsing of CLI output reliable (i.e. always in english), set LC_ALL accordingly. see #662
This commit is contained in:
parent
582c828deb
commit
92ab1a3e00
1 changed files with 5 additions and 0 deletions
|
@ -30,6 +30,11 @@ def execute(
|
||||||
"""
|
"""
|
||||||
args = cmd if shell else shlex.split(cmd)
|
args = cmd if shell else shlex.split(cmd)
|
||||||
logging.debug(cmd)
|
logging.debug(cmd)
|
||||||
|
|
||||||
|
if not env:
|
||||||
|
env = os.environ.copy()
|
||||||
|
env["LC_ALL"] = "C"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
proc = subprocess.Popen(
|
proc = subprocess.Popen(
|
||||||
args,
|
args,
|
||||||
|
|
Loading…
Reference in a new issue