mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Fix a potential crash
This commit is contained in:
parent
d06af526b2
commit
fbe26d11cf
@ -378,7 +378,7 @@ class Controller:
|
|||||||
:param load: Load the topology
|
:param load: Load the topology
|
||||||
"""
|
"""
|
||||||
topo_data = load_topology(path)
|
topo_data = load_topology(path)
|
||||||
topology = topo_data.pop("topology")
|
topo_data.pop("topology")
|
||||||
topo_data.pop("version")
|
topo_data.pop("version")
|
||||||
topo_data.pop("revision")
|
topo_data.pop("revision")
|
||||||
topo_data.pop("type")
|
topo_data.pop("type")
|
||||||
|
@ -440,7 +440,7 @@ class Project:
|
|||||||
Create a link. By default the link is empty
|
Create a link. By default the link is empty
|
||||||
"""
|
"""
|
||||||
if link_id and link_id in self._links:
|
if link_id and link_id in self._links:
|
||||||
return self._links[link.id]
|
return self._links[link_id]
|
||||||
link = UDPLink(self, link_id=link_id)
|
link = UDPLink(self, link_id=link_id)
|
||||||
self._links[link.id] = link
|
self._links[link.id] = link
|
||||||
self.dump()
|
self.dump()
|
||||||
|
Loading…
Reference in New Issue
Block a user