Skip to content
Snippets Groups Projects
Commit 6882becf authored by Yang Yuechun's avatar Yang Yuechun
Browse files

fix command 04

parent 8832d4dc
No related branches found
No related tags found
No related merge requests found
......@@ -59,10 +59,14 @@ while 1:
name = len(nodes_info)+1
data = str(gn.create_node(project_id, name, node_type))+str('END')
elif index == '04':
elif index[:2] == '04':
node_idx = int(index[2:4])
nodes_info = gn.update_nodes_info()
node_id = nodes_info[-1].get('node_id')
data = str(gns3.node_delete(project_id, node_id))+str('END')
if node_idx>=0 and node_idx<len(nodes_info):
node_id = nodes_info[node_idx].get('node_id')
data = str(gns3.node_delete(project_id, node_id))+str('END')
else:
data = str('incorrect index')+str('END')
elif index[:2] == '05':
node_idx_1 = int(index[2:4])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment