1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-29 02:08:10 +00:00

Improve vmrun error messages

This commit is contained in:
Julien Duponchelle 2016-10-19 12:03:42 +02:00
parent 97cc60fad4
commit 3ecdd1d30c
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -390,12 +390,12 @@ class VMware(BaseManager):
try:
stdout_data, _ = yield from asyncio.wait_for(process.communicate(), timeout=timeout)
except asyncio.TimeoutError:
raise VMwareError("vmrun has timed out after {} seconds!".format(timeout))
raise VMwareError("vmrun has timed out after {} seconds!\nTry to run {} in a terminal to see more informations.".format(timeout, command_string))
if process.returncode:
# vmrun print errors on stdout
vmrun_error = stdout_data.decode("utf-8", errors="ignore")
raise VMwareError("vmrun has returned an error: {}".format(vmrun_error))
raise VMwareError("vmrun has returned an error: {}\nTry to run {} in a terminal to see more informations.".format(vmrun_error, command_string))
return stdout_data.decode("utf-8", errors="ignore").splitlines()