mirror of
				https://github.com/python/cpython.git
				synced 2025-10-24 18:33:49 +00:00 
			
		
		
		
	Under certain conditions (sometimes triggered by the test suite),
"from xml.parsers import expat" succeeds but the imported expat module is an empty shell. Make sure we don't be fooled by that.
This commit is contained in:
		
							parent
							
								
									e37e96df06
								
							
						
					
					
						commit
						b855134a0d
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -361,6 +361,8 @@ def handle_entityref(self, entity): | |||
| 
 | ||||
| try: | ||||
|     from xml.parsers import expat | ||||
|     if not hasattr(expat, "ParserCreate"): | ||||
|         raise ImportError, "ParserCreate" | ||||
| except ImportError: | ||||
|     ExpatParser = None | ||||
| else: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum