mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									7b8e281997
								
							
						
					
					
						commit
						6550051691
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -98,7 +98,7 @@ def listclasses(self): | |||
|         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(''): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Raymond Hettinger
						Raymond Hettinger