| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a8c8526 commit 342b115
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -272,9 +272,8 @@ report_wakeup_write_error(void *data) | |||
| 272 | 272 | errno = (int) (intptr_t) data; | |
| 273 | 273 | PyErr_Fetch(&exc, &val, &tb); | |
| 274 | 274 | PyErr_SetFromErrno(PyExc_OSError); | |
| 275 | - PySys_WriteStderr("Exception ignored when trying to write to the " | ||
| 276 | - "signal wakeup fd:\n"); | ||
| 277 | - PyErr_WriteUnraisable(NULL); | ||
| 275 | + _PyErr_WriteUnraisableMsg("when trying to write to the signal wakeup fd", | ||
| 276 | + NULL); | ||
| 278 | 277 | PyErr_Restore(exc, val, tb); | |
| 279 | 278 | errno = save_errno; | |
| 280 | 279 | return 0; | |
@@ -284,15 +283,15 @@ report_wakeup_write_error(void *data) | |||
| 284 | 283 | static int | |
| 285 | 284 | report_wakeup_send_error(void* data) | |
| 286 | 285 | { | |
| 286 | + int send_errno = (int) (intptr_t) data; | ||
| 287 | + | ||
| 287 | 288 | PyObject *exc, *val, *tb; | |
| 288 | 289 | PyErr_Fetch(&exc, &val, &tb); | |
| 289 | 290 | /* PyErr_SetExcFromWindowsErr() invokes FormatMessage() which | |
| 290 | 291 | recognizes the error codes used by both GetLastError() and | |
| 291 | 292 | WSAGetLastError */ | |
| 292 | - PyErr_SetExcFromWindowsErr(PyExc_OSError, (int) (intptr_t) data); | ||
| 293 | - PySys_WriteStderr("Exception ignored when trying to send to the " | ||
| 294 | - "signal wakeup fd:\n"); | ||
| 295 | - PyErr_WriteUnraisable(NULL); | ||
| 293 | + PyErr_SetExcFromWindowsErr(PyExc_OSError, send_errno); | ||
| 294 | + _PyErr_WriteUnraisableMsg("when trying to send to the signal wakeup fd", NULL); | ||
| 296 | 295 | PyErr_Restore(exc, val, tb); | |
| 297 | 296 | return 0; | |
| 298 | 297 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments