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