Commits

Anonymous committed b68a9f0

override GetPyData to avoid unnecessary assertions

  • Participants
  • Parent commits 84a995a

Comments (0)

Files changed (1)

src/eclib/_filetree.py

                     pass
         return paths
 
+    def GetPyData(self, item):
+        """Get data from given tree item
+        @param item: TreeItemId
+
+        """
+        data = None
+        # avoid assertions in base class when retrieving data...
+        if item and item.IsOk():
+            try:
+                data = super(FileTree, self).GetPyData(item)
+            except wx.PyAssertionError:
+                pass
+        return data
+
     def SortParentDirectory(self, item):
         """Sort the parent directory of the given item"""
         parent = self.GetItemParent(item)