mirror of
				https://github.com/python/cpython.git
				synced 2025-11-01 06:01:29 +00:00 
			
		
		
		
	Fix ast_for_atom()
Clear PyObject_Str() exception if it failed, ast_error() should not be called with an exception set.
This commit is contained in:
		
							parent
							
								
									99bb14bf0c
								
							
						
					
					
						commit
						00723e0353
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -2040,6 +2040,7 @@ ast_for_atom(struct compiling *c, const node *n) | ||||||
|                     PyOS_snprintf(buf, sizeof(buf), "(%s) %s", errtype, s); |                     PyOS_snprintf(buf, sizeof(buf), "(%s) %s", errtype, s); | ||||||
|                     Py_DECREF(errstr); |                     Py_DECREF(errstr); | ||||||
|                 } else { |                 } else { | ||||||
|  |                     PyErr_Clear(); | ||||||
|                     PyOS_snprintf(buf, sizeof(buf), "(%s) unknown error", errtype); |                     PyOS_snprintf(buf, sizeof(buf), "(%s) unknown error", errtype); | ||||||
|                 } |                 } | ||||||
|                 ast_error(c, n, buf); |                 ast_error(c, n, buf); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner