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

Fixes bug when remove_nio() is not a coroutine for ATM and FR switches.

This commit is contained in:
grossmj 2015-03-24 22:15:49 -06:00
parent 07067d6765
commit 588088ca93

View File

@ -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"])
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(