1
0
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:
Julien Duponchelle 2017-02-06 11:07:35 +01:00
parent d06af526b2
commit fbe26d11cf
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8
2 changed files with 2 additions and 2 deletions

View File

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

View File

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