Display socket error from manage_socket.
(err, address)
| 212 | server.handle_request() # A single request only |
| 213 | |
| 214 | def show_socket_error(err, address): |
| 215 | "Display socket error from manage_socket." |
| 216 | import tkinter |
| 217 | from tkinter.messagebox import showerror |
| 218 | root = tkinter.Tk() |
| 219 | fix_scaling(root) |
| 220 | root.withdraw() |
| 221 | showerror( |
| 222 | "Subprocess Connection Error", |
| 223 | f"IDLE's subprocess can't connect to {address[0]}:{address[1]}.\n" |
| 224 | f"Fatal OSError #{err.errno}: {err.strerror}.\n" |
| 225 | "See the 'Startup failure' section of the IDLE doc, online at\n" |
| 226 | "https://docs.python.org/3/library/idle.html#startup-failure", |
| 227 | parent=root) |
| 228 | root.destroy() |
| 229 | |
| 230 | |
| 231 | def get_message_lines(typ, exc, tb): |
no test coverage detected
searching dependent graphs…