]> granicus.if.org Git - python/commitdiff
No longer need to be very careful with saving the exception state
authorGuido van Rossum <guido@python.org>
Mon, 29 Sep 1997 23:17:48 +0000 (23:17 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 29 Sep 1997 23:17:48 +0000 (23:17 +0000)
first.  Don't store the traceback as a local variable, to avoid
circular references.

Lib/SocketServer.py

index ecd405fe096ed40593ad000a55a4cc8a52efa423..049a4b6cc775b1e33fa35afdee9a7c6945f0b1df 100644 (file)
@@ -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