mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Fix UnboundLocalError: local variable 'node' referenced before assignment. Fixes #1256.
This commit is contained in:
parent
4143ee8178
commit
ed275e4ec5
@ -335,9 +335,12 @@ class BaseManager:
|
||||
:returns: Node instance
|
||||
"""
|
||||
|
||||
node = None
|
||||
try:
|
||||
node = yield from self.close_node(node_id)
|
||||
node = self.get_node(node_id)
|
||||
yield from self.close_node(node_id)
|
||||
finally:
|
||||
if node:
|
||||
node.project.emit("node.deleted", node)
|
||||
yield from node.project.remove_node(node)
|
||||
if node.id in self._nodes:
|
||||
|
Loading…
Reference in New Issue
Block a user