mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 07:11:13 +02:00
Replace asyncio.async with ensure_future because of deprecation, Fixes: #1269
This commit is contained in:
1 parent
838d82a98b
commit
d9a0ec9ff3
36 files changed
+192
-192
No files matched your search
@@ -172,7 +172,7 @@ class Dynamips(BaseManager):
|
||||
|
||||
tasks = []
|
||||
for device in self._devices.values():
|
||||
tasks.append(asyncio.async(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.async(device.delete()))
|
||||
tasks.append(asyncio.ensure_future(device.delete()))
|
||||
|
||||
if tasks:
|
||||
done, _ = yield from asyncio.wait(tasks)
|
||||
|
||||
@@ -194,7 +194,7 @@ class Router(BaseNode):
|
||||
"""
|
||||
Called when the NVRAM file has changed
|
||||
"""
|
||||
asyncio.async(self.save_configs())
|
||||
asyncio.ensure_future(self.save_configs())
|
||||
|
||||
@property
|
||||
def dynamips_id(self):
|
||||
|
||||
Reference in new issue
Block a user