[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:
Tobias Witek 2020-06-24 07:47:31 +02:00
parent 582c828deb
commit 92ab1a3e00

View file

@ -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,