mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-02 19:16:42 +00:00
Catch an error at startup when the remote GNS3 VM is not a real GNS3 VM
This commit is contained in:
parent
5edb631b00
commit
03a134af75
@ -18,6 +18,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import copy
|
import copy
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import aiohttp
|
||||||
|
|
||||||
from ...utils.asyncio import locked_coroutine
|
from ...utils.asyncio import locked_coroutine
|
||||||
from .vmware_gns3_vm import VMwareGNS3VM
|
from .vmware_gns3_vm import VMwareGNS3VM
|
||||||
@ -242,10 +243,13 @@ class GNS3VM:
|
|||||||
yield from self.start()
|
yield from self.start()
|
||||||
except GNS3VMError as e:
|
except GNS3VMError as e:
|
||||||
# User will receive the error later when they will try to use the node
|
# User will receive the error later when they will try to use the node
|
||||||
|
try:
|
||||||
yield from self._controller.add_compute(compute_id="vm",
|
yield from self._controller.add_compute(compute_id="vm",
|
||||||
name="GNS3 VM ({})".format(self.current_engine().vmname),
|
name="GNS3 VM ({})".format(self.current_engine().vmname),
|
||||||
host=None,
|
host=None,
|
||||||
force=True)
|
force=True)
|
||||||
|
except aiohttp.web.HTTPConflict:
|
||||||
|
pass
|
||||||
log.error("Can't start the GNS3 VM: {}", str(e))
|
log.error("Can't start the GNS3 VM: {}", str(e))
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
|
Loading…
Reference in New Issue
Block a user