summaryrefslogtreecommitdiffstats
path: root/Tools/idle
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/idle')
-rw-r--r--Tools/idle/ClassBrowser.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Tools/idle/ClassBrowser.py b/Tools/idle/ClassBrowser.py
index f01f249..2d81f9e 100644
--- a/Tools/idle/ClassBrowser.py
+++ b/Tools/idle/ClassBrowser.py
@@ -142,8 +142,10 @@ class ClassBrowserTreeItem(TreeItem):
return "folder"
def IsExpandable(self):
- if self.cl:
- return not not self.cl.methods
+ try:
+ return bool(self.cl.methods)
+ except AttributeError:
+ return False
def GetSubList(self):
if not self.cl: