summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-20 10:21:41 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-03-20 10:21:41 (GMT)
commit7f04d4d4b7fe0ed5c56b1778c63ee6ac2170a694 (patch)
treea852d1b590a9218b68c6615730c3acc5752c57a9
parentfbd6f9ed124c89753f6e3fd2cd84e4d9c474cc1f (diff)
downloadcpython-7f04d4d4b7fe0ed5c56b1778c63ee6ac2170a694.zip
cpython-7f04d4d4b7fe0ed5c56b1778c63ee6ac2170a694.tar.gz
cpython-7f04d4d4b7fe0ed5c56b1778c63ee6ac2170a694.tar.bz2
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".
-rw-r--r--Python/fileutils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c
index 702e25d..cc6582c 100644
--- a/Python/fileutils.c
+++ b/Python/fileutils.c
@@ -1178,7 +1178,8 @@ _Py_read(int fd, void *buf, size_t count)
if (async_err) {
/* read() was interrupted by a signal (failed with EINTR)
* and the Python signal handler raised an exception */
- assert(errno == EINTR && PyErr_Occurred());
+ assert(errno == EINTR);
+ assert(PyErr_Occurred());
return -1;
}
if (n < 0) {
@@ -1254,7 +1255,8 @@ _Py_write(int fd, const void *buf, size_t count)
if (async_err) {
/* write() was interrupted by a signal (failed with EINTR)
* and the Python signal handler raised an exception */
- assert(errno == EINTR && PyErr_Occurred());
+ assert(errno == EINTR);
+ assert(PyErr_Occurred());
return -1;
}
if (n < 0) {