mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Ignore invalid characters when reading the output of a process
It should happend only when user try to use another binary and the code of VPCS, dynamips... Will detect it's not the correct binary. For example we detect this error after an user used SupperPutty instead of VPCS. Fix #235
This commit is contained in:
parent
87efc4d55a
commit
e2ef78a7c4
@ -52,7 +52,10 @@ def subprocess_check_output(*args, cwd=None, env=None):
|
|||||||
output = yield from proc.stdout.read()
|
output = yield from proc.stdout.read()
|
||||||
if output is None:
|
if output is None:
|
||||||
return ""
|
return ""
|
||||||
return output.decode("utf-8")
|
# If we received garbage we ignore invalid characters
|
||||||
|
# it should happend only when user try to use another binary
|
||||||
|
# and the code of VPCS, dynamips... Will detect it's not the correct binary
|
||||||
|
return output.decode("utf-8", errors="ignore")
|
||||||
|
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
|
Loading…
Reference in New Issue
Block a user