[Python-checkins] bpo-39184: Fix incorrect return value (GH-18580)

Steve Dower webhook-mailer at python.org
Thu Feb 20 17:24:51 EST 2020


https://github.com/python/cpython/commit/6c444d0dab8f06cf304263b34beb299101cef3de
commit: 6c444d0dab8f06cf304263b34beb299101cef3de
branch: master
author: Steve Dower <steve.dower at python.org>
committer: GitHub <noreply at github.com>
date: 2020-02-20T14:24:43-08:00
summary:

bpo-39184: Fix incorrect return value (GH-18580)



https://bugs.python.org/issue39184



Automerge-Triggered-By: @zooba

files:
M PC/msvcrtmodule.c

diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
index 5c06ec2621ea6..faceb03fba39d 100644
--- a/PC/msvcrtmodule.c
+++ b/PC/msvcrtmodule.c
@@ -180,7 +180,7 @@ msvcrt_open_osfhandle_impl(PyObject *module, void *handle, int flags)
     int fd;
 
     if (PySys_Audit("msvcrt.open_osfhandle", "Ki", handle, flags) < 0) {
-        return NULL;
+        return -1;
     }
 
     _Py_BEGIN_SUPPRESS_IPH



More information about the Python-checkins mailing list