1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Do not wait auto start to finish in order to complete project opening

Fix https://github.com/GNS3/gns3-gui/issues/2074
This commit is contained in:
Julien Duponchelle 2017-05-22 20:18:07 +02:00
parent 4dc55a5af4
commit 7d30da5d4e
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8
2 changed files with 6 additions and 1 deletions

View File

@ -675,7 +675,10 @@ class Project:
self._loading = False
# Should we start the nodes when project is open
if self._auto_start:
yield from self.start_all()
# Start all in the background without waiting for completion
# we ignore errors because we want to let the user open
# their project and fix it
asyncio.async(self.start_all())
@asyncio.coroutine
def wait_loaded(self):

View File

@ -18,6 +18,7 @@
import io
import asyncio
import unittest.mock
import collections.abc
class _asyncio_patch:
@ -69,6 +70,7 @@ class AsyncioMagicMock(unittest.mock.MagicMock):
"""
Magic mock returning coroutine
"""
__class__ = collections.abc.Awaitable
def __init__(self, return_value=None, return_values=None, **kwargs):
"""