...and the old pyclbr.py faked Function instances with Class instances
authorKurt B. Kaiser <kbk@shore.net>
Mon, 20 Jan 2003 04:49:37 +0000 (04:49 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Mon, 20 Jan 2003 04:49:37 +0000 (04:49 +0000)
which had empty method and super attributes.  ClassBrowser.IsExpandable()
could not handle the missing attributes.  SF Bug 667787.

Lib/idlelib/ClassBrowser.py

index 240394b68f46b32218d2e8e952d7245be90b6376..82f51915d20eef6bcfadd9878f4b3e0268bc93b3 100644 (file)
@@ -143,7 +143,10 @@ class ClassBrowserTreeItem(TreeItem):
 
     def IsExpandable(self):
         if self.cl:
-            return not not self.cl.methods
+            try:
+                return not not self.cl.methods
+            except AttributeError:
+                return False
 
     def GetSubList(self):
         if not self.cl: