ConfigTreeNode.py
changeset 1033 1eec9b855e47
parent 967 8a339cd61cb4
child 1061 02f371f3e063
equal deleted inserted replaced
1032:c4989e53f9c3 1033:1eec9b855e47
   463         CTNInstance.OnCTNClose()
   463         CTNInstance.OnCTNClose()
   464         # Delete confnode dir
   464         # Delete confnode dir
   465         shutil.rmtree(CTNInstance.CTNPath())
   465         shutil.rmtree(CTNInstance.CTNPath())
   466         # Remove child of Children
   466         # Remove child of Children
   467         self.Children[CTNInstance.CTNType].remove(CTNInstance)
   467         self.Children[CTNInstance.CTNType].remove(CTNInstance)
       
   468         if len(self.Children[CTNInstance.CTNType]) == 0:
       
   469             self.Children.pop(CTNInstance.CTNType)
   468         # Forget it... (View have to refresh)
   470         # Forget it... (View have to refresh)
   469 
   471 
   470     def CTNRemove(self):
   472     def CTNRemove(self):
   471         # Fetch the confnode
   473         # Fetch the confnode
   472         #CTNInstance = self.GetChildByName(CTNName)
   474         #CTNInstance = self.GetChildByName(CTNName)