Conservative approach to supported versions of Python 3.4 and asyncio.ensure_future, Ref. #1269

This commit is contained in:
ziajka committed 2018-01-29 12:13:20 +01:00
1 parent 3c5ca9ce0e
commit eeae07e783
18 files changed
+60 -39

No files matched your search

+3 -3
View File
@@ -34,7 +34,7 @@ import re
log = logging.getLogger(__name__)
from gns3server.utils.interfaces import interfaces, is_interface_up
from gns3server.utils.asyncio import wait_run_in_executor
from gns3server.utils.asyncio import wait_run_in_executor, asyncio_ensure_future
from gns3server.utils import parse_version
from uuid import uuid4
from ..base_manager import BaseManager
@@ -172,7 +172,7 @@ class Dynamips(BaseManager):
tasks = []
for device in self._devices.values():
tasks.append(asyncio.ensure_future(device.hypervisor.stop()))
tasks.append(asyncio_ensure_future(device.hypervisor.stop()))
if tasks:
done, _ = yield from asyncio.wait(tasks)
@@ -196,7 +196,7 @@ class Dynamips(BaseManager):
tasks = []
for device in self._devices.values():
if device.project.id == project.id:
tasks.append(asyncio.ensure_future(device.delete()))
tasks.append(asyncio_ensure_future(device.delete()))
if tasks:
done, _ = yield from asyncio.wait(tasks)