Commit 18acea7c authored by Raymond Hettinger's avatar Raymond Hettinger

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.
parent 08e54270
......@@ -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(''):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment