]> granicus.if.org Git - python/commitdiff
Remove unneeded PyErr_Clear() in _winapi_SetNamedPipeHandleState_impl() (GH-8281)
authorZackery Spytz <zspytz@gmail.com>
Sat, 25 Aug 2018 17:10:14 +0000 (11:10 -0600)
committerXiang Zhang <angwerzx@126.com>
Sat, 25 Aug 2018 17:10:14 +0000 (01:10 +0800)
Modules/_winapi.c

index 75d1f0678effe68f7666ee0d82ac9693ed1c3a26..30f269fbdccdad8f36951d8b24ce3a7e6507e0c8 100644 (file)
@@ -1432,8 +1432,6 @@ _winapi_SetNamedPipeHandleState_impl(PyObject *module, HANDLE named_pipe,
     DWORD dwArgs[3], *pArgs[3] = {NULL, NULL, NULL};
     int i;
 
-    PyErr_Clear();
-
     for (i = 0 ; i < 3 ; i++) {
         if (oArgs[i] != Py_None) {
             dwArgs[i] = PyLong_AsUnsignedLongMask(oArgs[i]);