summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/ClassBrowser.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2003-01-20 04:49:37 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2003-01-20 04:49:37 (GMT)
commit0b743441a60640824360bdff15780fc5d40489d6 (patch)
treebe00f61a07705a756755b8777f16f65859388260 /Lib/idlelib/ClassBrowser.py
parentea4250df7da556bc01b6e48f58afc1cd07c82abf (diff)
downloadcpython-0b743441a60640824360bdff15780fc5d40489d6.zip
cpython-0b743441a60640824360bdff15780fc5d40489d6.tar.gz
cpython-0b743441a60640824360bdff15780fc5d40489d6.tar.bz2
...and the old pyclbr.py faked Function instances with Class instances
which had empty method and super attributes. ClassBrowser.IsExpandable() could not handle the missing attributes. SF Bug 667787.
Diffstat (limited to 'Lib/idlelib/ClassBrowser.py')
-rw-r--r--Lib/idlelib/ClassBrowser.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/idlelib/ClassBrowser.py b/Lib/idlelib/ClassBrowser.py
index 240394b..82f5191 100644
--- a/Lib/idlelib/ClassBrowser.py
+++ b/Lib/idlelib/ClassBrowser.py
@@ -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: