diff options
author | Raymond Hettinger <python@rcn.com> | 2003-01-18 22:53:36 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-01-18 22:53:36 +0000 |
commit | 18acea7c8ea44fe1e655d64fe4f04fc9710f9ea7 (patch) | |
tree | a56a0adff892e05de992d5811eaabb82b0f964ef /Tools/idle/ClassBrowser.py | |
parent | 08e54270f2dae5014f04d627739f71ecce5ad19e (diff) | |
download | cpython-git-18acea7c8ea44fe1e655d64fe4f04fc9710f9ea7.tar.gz |
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/ClassBrowser.py')
-rw-r--r-- | Tools/idle/ClassBrowser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/idle/ClassBrowser.py b/Tools/idle/ClassBrowser.py index 338836a9fa..f01f249ed8 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(''): |