Allow deleting configuration tree node with no corresponding directory in project tree
authorEdouard Tisserant
Thu, 10 May 2018 08:33:50 +0200
changeset 2004 28af541d776b
parent 2003 2076df8743b5
child 2010 bb9c28bd204f
Allow deleting configuration tree node with no corresponding directory in project tree
ConfigTreeNode.py
--- a/ConfigTreeNode.py	Mon May 07 15:10:39 2018 +0200
+++ b/ConfigTreeNode.py	Thu May 10 08:33:50 2018 +0200
@@ -499,7 +499,10 @@
         # Call the OnCloseMethod
         CTNInstance.OnCTNClose()
         # Delete confnode dir
-        shutil.rmtree(CTNInstance.CTNPath())
+        try:
+            shutil.rmtree(CTNInstance.CTNPath())
+        except:
+            pass
         # Remove child of Children
         self.Children[CTNInstance.CTNType].remove(CTNInstance)
         if len(self.Children[CTNInstance.CTNType]) == 0: