mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-23 23:38:21 +00:00
Fixes bug when remove_nio() is not a coroutine for ATM and FR switches.
This commit is contained in:
parent
07067d6765
commit
588088ca93
@ -181,7 +181,10 @@ class DynamipsDeviceHandler:
|
||||
dynamips_manager = Dynamips.instance()
|
||||
device = dynamips_manager.get_device(request.match_info["device_id"], project_id=request.match_info["project_id"])
|
||||
port_number = int(request.match_info["port_number"])
|
||||
yield from device.remove_nio(port_number)
|
||||
if asyncio.iscoroutinefunction(device.remove_nio):
|
||||
yield from device.remove_nio(port_number)
|
||||
else:
|
||||
device.remove_nio(port_number)
|
||||
response.set_status(204)
|
||||
|
||||
@Route.post(
|
||||
|
Loading…
Reference in New Issue
Block a user