From: Guido van Rossum Date: Mon, 29 Sep 1997 23:17:48 +0000 (+0000) Subject: No longer need to be very careful with saving the exception state X-Git-Tag: v1.5a4~126 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c90ad2103eb9aca14b7a910cbcdcd7b570f690ab;p=python No longer need to be very careful with saving the exception state first. Don't store the traceback as a local variable, to avoid circular references. --- diff --git a/Lib/SocketServer.py b/Lib/SocketServer.py index ecd405fe09..049a4b6cc7 100644 --- a/Lib/SocketServer.py +++ b/Lib/SocketServer.py @@ -248,12 +248,11 @@ class TCPServer: The default is to print a traceback and continue. """ - exc, value, tb = sys.exc_type, sys.exc_value, sys.exc_traceback print '-'*40 print 'Exception happened during processing of request from', print client_address import traceback - traceback.print_exception(exc, value, tb) + traceback.print_exc() print '-'*40