mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Fix #14600. Correct reference handling and naming of ImportError convenience function
This commit is contained in:
		
							parent
							
								
									fba807ac44
								
							
						
					
					
						commit
						09b86d1196
					
				
					 5 changed files with 37 additions and 59 deletions
				
			
		|  | @ -2460,7 +2460,8 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *given_globals, | |||
|         PyObject *msg = PyUnicode_FromFormat("import of %R halted; " | ||||
|                                              "None in sys.modules", abs_name); | ||||
|         if (msg != NULL) { | ||||
|             PyErr_SetFromImportErrorWithName(msg, abs_name); | ||||
|             PyErr_SetImportError(msg, abs_name, NULL); | ||||
|             Py_DECREF(msg); | ||||
|         } | ||||
|         mod = NULL; | ||||
|         goto error_with_unlock; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brian Curtin
						Brian Curtin