mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Use sys.exc_info() where needed.
This commit is contained in:
		
							parent
							
								
									c90ad2103e
								
							
						
					
					
						commit
						f15d15964b
					
				
					 9 changed files with 38 additions and 32 deletions
				
			
		|  | @ -1210,7 +1210,7 @@ def g(f=f): | |||
| 
 | ||||
| def print_exception(type=None, value=None, tb=None, limit=None): | ||||
|     if type is None: | ||||
| 	type, value, tb = sys.exc_type, sys.exc_value, sys.exc_traceback | ||||
| 	type, value, tb = sys.exc_info() | ||||
|     import traceback | ||||
|     print | ||||
|     print "<H3>Traceback (innermost last):</H3>" | ||||
|  | @ -1220,6 +1220,7 @@ def print_exception(type=None, value=None, tb=None, limit=None): | |||
| 	escape(string.join(list[:-1], "")), | ||||
| 	escape(list[-1]), | ||||
| 	) | ||||
|     del tb | ||||
| 
 | ||||
| def print_environ(environ=os.environ): | ||||
|     """Dump the shell environment as HTML.""" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum