]> granicus.if.org Git - python/commitdiff
Issue #23708: Split assertion expression in two assertions in _Py_read() and
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 20 Mar 2015 10:21:41 +0000 (11:21 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 20 Mar 2015 10:21:41 +0000 (11:21 +0100)
_Py_write() to know which test failed on the buildbot "AMD64 Snow Leop 3.x".

Python/fileutils.c

index 702e25df619dd96e8671a0ebd5b9e41dfdbf895f..cc6582c7aa1f76049dc681e7922f7f98a8c55152 100644 (file)
@@ -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) {