[Python-checkins] python/dist/src/Tools/idle ClassBrowser.py,1.14,1.15
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
2003年1月18日 14:53:38 -0800
Update of /cvsroot/python/python/dist/src/Tools/idle
In directory sc8-pr-cvs1:/tmp/cvs-serv29747
Modified Files:
ClassBrowser.py
Log Message:
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.
Index: ClassBrowser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/idle/ClassBrowser.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** ClassBrowser.py 3 Dec 2002 09:28:36 -0000 1.14
--- ClassBrowser.py 18 Jan 2003 22:53:36 -0000 1.15
***************
*** 99,103 ****
if cl.module == name:
s = key
! if cl.super:
supers = []
for sup in cl.super:
--- 99,103 ----
if cl.module == name:
s = key
! if hasattr(cl, "super") and cl.super:
supers = []
for sup in cl.super: