Commits

Anonymous committed 963a0fb

In find_module(), do not silence fileno() and dup() errors.

  • Participants
  • Parent commits fc5de19
  • Branches 3.2

Comments (0)

Files changed (1)

File Python/import.c

             fd = dup(fd);
         fclose(fp);
         fp = NULL;
+        if (fd == -1)
+            return PyErr_SetFromErrno(PyExc_OSError);
     }
     if (fd != -1) {
         if (strchr(fdp->mode, 'b') == NULL) {