mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-30 21:03:49 +02: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
|
:returns: Node instance
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
node = None
|
||||||
try:
|
try:
|
||||||
node = yield from self.close_node(node_id)
|
node = self.get_node(node_id)
|
||||||
|
yield from self.close_node(node_id)
|
||||||
finally:
|
finally:
|
||||||
|
if node:
|
||||||
node.project.emit("node.deleted", node)
|
node.project.emit("node.deleted", node)
|
||||||
yield from node.project.remove_node(node)
|
yield from node.project.remove_node(node)
|
||||||
if node.id in self._nodes:
|
if node.id in self._nodes:
|
||||||
|
Loading…
Reference in New Issue
Block a user