From 6550051691d604c728ed56e4acf90dc6535981f9 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sun, 19 Jan 2003 02:37:41 +0000 Subject: 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. --- Lib/idlelib/ClassBrowser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(''): -- cgit v0.12