MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / MyRPCServer

Class MyRPCServer

tools/python-3.11.9-amd64/Lib/idlelib/run.py:394–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392
393
394class MyRPCServer(rpc.RPCServer):
395
396 def handle_error(self, request, client_address):
397 """Override RPCServer method for IDLE
398
399 Interrupt the MainThread and exit server if link is dropped.
400
401 """
402 global quitting
403 try:
404 raise
405 except SystemExit:
406 raise
407 except EOFError:
408 global exit_now
409 exit_now = True
410 thread.interrupt_main()
411 except:
412 erf = sys.__stderr__
413 print(textwrap.dedent(f"""
414 {'-'*40}
415 Unhandled exception in user code execution server!'
416 Thread: {threading.current_thread().name}
417 IDLE Client Address: {client_address}
418 Request: {request!r}
419 """), file=erf)
420 traceback.print_exc(limit=-20, file=erf)
421 print(textwrap.dedent(f"""
422 *** Unrecoverable, server exiting!
423
424 Users should never see this message; it is likely transient.
425 If this recurs, report this with a copy of the message
426 and an explanation of how to make it repeat.
427 {'-'*40}"""), file=erf)
428 quitting = True
429 thread.interrupt_main()
430
431
432# Pseudofiles for shell-remote communication (also used in pyshell)

Callers 1

manage_socketFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected