commit
39b7dfe43d
1 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
import shlex
|
import shlex
|
||||||
import logging
|
import logging
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import os
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from exceptions import RuntimeError
|
from exceptions import RuntimeError
|
||||||
|
@ -29,7 +30,9 @@ def aslist(val):
|
||||||
def execute(cmd, wait=True):
|
def execute(cmd, wait=True):
|
||||||
logging.info("executing command '{}'".format(cmd))
|
logging.info("executing command '{}'".format(cmd))
|
||||||
args = shlex.split(cmd)
|
args = shlex.split(cmd)
|
||||||
proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
my_env = os.environ.copy()
|
||||||
|
my_env['LC_ALL'] = "C"
|
||||||
|
proc = subprocess.Popen(args, env=my_env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
rv = None
|
rv = None
|
||||||
|
|
||||||
if wait:
|
if wait:
|
||||||
|
|
Loading…
Reference in a new issue