summaryrefslogtreecommitdiffstats
path: root/Tools/idle
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-01-18 22:53:36 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-01-18 22:53:36 (GMT)
commit18acea7c8ea44fe1e655d64fe4f04fc9710f9ea7 (patch)
treea56a0adff892e05de992d5811eaabb82b0f964ef /Tools/idle
parent08e54270f2dae5014f04d627739f71ecce5ad19e (diff)
downloadcpython-18acea7c8ea44fe1e655d64fe4f04fc9710f9ea7.zip
cpython-18acea7c8ea44fe1e655d64fe4f04fc9710f9ea7.tar.gz
cpython-18acea7c8ea44fe1e655d64fe4f04fc9710f9ea7.tar.bz2
SF bug #668906: class browser raises AttributeError
The Py2.3 updates to the pyclbr module return both Class and Function objects. The IDLE ClassBrowser module only knew about Class and could not handle objects which did not define "super". Fixed by adding a guard.
Diffstat (limited to 'Tools/idle')
-rw-r--r--Tools/idle/ClassBrowser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/idle/ClassBrowser.py b/Tools/idle/ClassBrowser.py
index 338836a..f01f249 100644
--- a/Tools/idle/ClassBrowser.py
+++ b/Tools/idle/ClassBrowser.py
@@ -98,7 +98,7 @@ class ModuleBrowserTreeItem(TreeItem):
for key, cl in dict.items():
if cl.module == name:
s = key
- if cl.super:
+ if hasattr(cl, "super") and cl.super:
supers = []
for sup in cl.super:
if type(sup) is type(''):