mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Fix crash in VPCS
This commit is contained in:
1 parent
0977af1c00
commit
3cb7213427
1 file changed
+3
-3
@@ -38,17 +38,17 @@ def wait_run_in_executor(func, *args):
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
def subprocess_check_output(*args, working_dir=None, env=None):
|
||||
def subprocess_check_output(*args, cwd=None, env=None):
|
||||
"""
|
||||
Run a command and capture output
|
||||
|
||||
:param *args: List of command arguments
|
||||
:param working_dir: Working directory
|
||||
:param cwd: Current working directory
|
||||
:param env: Command environment
|
||||
:returns: Command output
|
||||
"""
|
||||
|
||||
proc = yield from asyncio.create_subprocess_exec(*args, stdout=asyncio.subprocess.PIPE, cwd=working_dir, env=env)
|
||||
proc = yield from asyncio.create_subprocess_exec(*args, stdout=asyncio.subprocess.PIPE, cwd=cwd, env=env)
|
||||
output = yield from proc.stdout.read()
|
||||
if output is None:
|
||||
return ""
|
||||
|
||||
Reference in new issue
Block a user