mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Improve vmware vmrun error error message
This commit is contained in:
parent
40263e14ca
commit
a776b36e98
@ -389,12 +389,12 @@ class VMware(BaseManager):
|
|||||||
try:
|
try:
|
||||||
stdout_data, _ = yield from asyncio.wait_for(process.communicate(), timeout=timeout)
|
stdout_data, _ = yield from asyncio.wait_for(process.communicate(), timeout=timeout)
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
raise VMwareError("vmrun has timed out after {} seconds!\nTry to run {} in a terminal to see more informations.".format(timeout, command_string))
|
raise VMwareError("vmrun has timed out after {} seconds!\nTry to run {} in a terminal to see more informations.\nAnd make sure GNS3 and VMware run under the same user.".format(timeout, command_string))
|
||||||
|
|
||||||
if process.returncode:
|
if process.returncode:
|
||||||
# vmrun print errors on stdout
|
# vmrun print errors on stdout
|
||||||
vmrun_error = stdout_data.decode("utf-8", errors="ignore")
|
vmrun_error = stdout_data.decode("utf-8", errors="ignore")
|
||||||
raise VMwareError("vmrun has returned an error: {}\nTry to run {} in a terminal to see more informations.".format(vmrun_error, command_string))
|
raise VMwareError("vmrun has returned an error: {}\nTry to run {} in a terminal to see more informations.\nAnd make sure GNS3 and VMware run under the same user.".format(vmrun_error, command_string))
|
||||||
|
|
||||||
return stdout_data.decode("utf-8", errors="ignore").splitlines()
|
return stdout_data.decode("utf-8", errors="ignore").splitlines()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user