summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-01-19 02:37:41 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-01-19 02:37:41 (GMT)
commit6550051691d604c728ed56e4acf90dc6535981f9 (patch)
tree948348b7ed57639271bcefc07c8a54d0703d29c8
parent7b8e281997c7f34d5af86856fc66e7e1c4c7b6d7 (diff)
downloadcpython-6550051691d604c728ed56e4acf90dc6535981f9.zip
cpython-6550051691d604c728ed56e4acf90dc6535981f9.tar.gz
cpython-6550051691d604c728ed56e4acf90dc6535981f9.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.
-rw-r--r--Lib/idlelib/ClassBrowser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/ClassBrowser.py b/Lib/idlelib/ClassBrowser.py
index 338836a..240394b 100644
--- a/Lib/idlelib/ClassBrowser.py
+++ b/Lib/idlelib/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(''):