Skip to content

Commit 7f04d4d

Browse files
committed
Issue #23708: Split assertion expression in two assertions in _Py_read() and
_Py_write() to know which test failed on the buildbot "AMD64 Snow Leop 3.x".
1 parent fbd6f9e commit 7f04d4d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎Python/fileutils.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,8 @@ _Py_read(int fd, void *buf, size_t count)
11781178
if (async_err) {
11791179
/* read() was interrupted by a signal (failed with EINTR)
11801180
* and the Python signal handler raised an exception */
1181-
assert(errno == EINTR && PyErr_Occurred());
1181+
assert(errno == EINTR);
1182+
assert(PyErr_Occurred());
11821183
return -1;
11831184
}
11841185
if (n < 0) {
@@ -1254,7 +1255,8 @@ _Py_write(int fd, const void *buf, size_t count)
12541255
if (async_err) {
12551256
/* write() was interrupted by a signal (failed with EINTR)
12561257
* and the Python signal handler raised an exception */
1257-
assert(errno == EINTR && PyErr_Occurred());
1258+
assert(errno == EINTR);
1259+
assert(PyErr_Occurred());
12581260
return -1;
12591261
}
12601262
if (n < 0) {

0 commit comments

Comments
 (0)