mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-20 05:17:56 +00:00
Force English output for VBoxManage. Fixes #2266
This commit is contained in:
parent
702fea89fb
commit
ad47ffbe29
@ -109,9 +109,16 @@ class VirtualBox(BaseManager):
|
|||||||
command = [vboxmanage_path, "--nologo", subcommand]
|
command = [vboxmanage_path, "--nologo", subcommand]
|
||||||
command.extend(args)
|
command.extend(args)
|
||||||
command_string = " ".join(command)
|
command_string = " ".join(command)
|
||||||
|
env = os.environ.copy()
|
||||||
|
env["LANG"] = "en" # force english output because we rely on it to parse the output
|
||||||
log.info("Executing VBoxManage with command: {}".format(command_string))
|
log.info("Executing VBoxManage with command: {}".format(command_string))
|
||||||
try:
|
try:
|
||||||
process = await asyncio.create_subprocess_exec(*command, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE)
|
process = await asyncio.create_subprocess_exec(
|
||||||
|
*command,
|
||||||
|
stdout=asyncio.subprocess.PIPE,
|
||||||
|
stderr=asyncio.subprocess.PIPE,
|
||||||
|
env=env
|
||||||
|
)
|
||||||
except (OSError, subprocess.SubprocessError) as e:
|
except (OSError, subprocess.SubprocessError) as e:
|
||||||
raise VirtualBoxError("Could not execute VBoxManage: {}".format(e))
|
raise VirtualBoxError("Could not execute VBoxManage: {}".format(e))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user