diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py index 8bbc2143f10..15946a660ff 100644 --- a/Lib/idlelib/rpc.py +++ b/Lib/idlelib/rpc.py @@ -101,17 +101,17 @@ def handle_error(self, request, client_address): except EOFError: pass except: - erf = 'sys.__stderr__' - print>>erf, '-'*40 + erf = sys.__stderr__ + print>>erf, '\n' + '-'*40 print>>erf, 'Unhandled server exception!' print>>erf, 'Thread: %s' % threading.currentThread().getName() - print>>erf, 'Client Address: ', address + print>>erf, 'Client Address: ', client_address print>>erf, 'Request: ', repr(request) traceback.print_exc(file=erf) print>>erf, '\n*** Unrecoverable, server exiting!' print>>erf, '-'*40 import os - os._exit + os._exit(0) objecttable = {}