diff Python/import.c @ 85420:ef889c3d5dc6

Issue #18571: Implementation of the PEP 446: file descriptors and file handles are now created non-inheritable; add functions os.get/set_inheritable(), os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
author Victor Stinner <victor.stinner@gmail.com>
date Wed, 28 Aug 2013 00:53:59 +0200
parents ea4130668150
children 3055e61f1e66
line wrap: on
line diff
--- a/Python/import.c	Tue Aug 27 20:17:03 2013 +0300
+++ b/Python/import.c	Wed Aug 28 00:53:59 2013 +0200
@@ -1797,7 +1797,7 @@
                           &name, PyUnicode_FSDecoder, &pathname, &fob))
         return NULL;
     if (fob != NULL) {
-        fp = _Py_fopen(pathname, "r");
+        fp = _Py_fopen_obj(pathname, "r");
         if (fp == NULL) {
             Py_DECREF(pathname);
             if (!PyErr_Occurred())