Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 18acea7

Browse files
committed
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.
1 parent 08e5427 commit 18acea7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Tools/idle/ClassBrowser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def listclasses(self):
9898
for key, cl in dict.items():
9999
if cl.module == name:
100100
s = key
101-
if cl.super:
101+
if hasattr(cl, "super") and cl.super:
102102
supers = []
103103
for sup in cl.super:
104104
if type(sup) is type(''):

0 commit comments

Comments
 (0)