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

Catch GNS3 VM loading error at startup

This commit is contained in:
Julien Duponchelle 2017-04-04 14:23:43 +02:00
parent 7f621ed5dd
commit ec6fdb7324
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -31,7 +31,7 @@ from .symbols import Symbols
from ..version import __version__ from ..version import __version__
from .topology import load_topology from .topology import load_topology
from .gns3vm import GNS3VM from .gns3vm import GNS3VM
from .gns3vm.gns3_vm_error import GNS3VMError
import logging import logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -87,10 +87,13 @@ class Controller:
for c in computes: for c in computes:
try: try:
yield from self.add_compute(**c) yield from self.add_compute(**c)
except aiohttp.web_exceptions.HTTPConflict: except (aiohttp.web_exceptions.HTTPConflict):
pass # Skip not available servers at loading pass # Skip not available servers at loading
yield from self.load_projects() yield from self.load_projects()
try:
yield from self.gns3vm.auto_start_vm() yield from self.gns3vm.auto_start_vm()
except GNS3VMError as e:
log.warn(str(e))
yield from self._project_auto_open() yield from self._project_auto_open()
def _update_config(self): def _update_config(self):