[Python-checkins] Remove unneeded PyErr_Occurred() check in os_lseek_impl() (GH-7557)

Serhiy Storchaka webhook-mailer at python.org
Sun Jun 10 03:28:04 EDT 2018


https://github.com/python/cpython/commit/69dccc397ad1522309f15e4d5e0afe68b782ba66
commit: 69dccc397ad1522309f15e4d5e0afe68b782ba66
branch: master
author: Zackery Spytz <zspytz at gmail.com>
committer: Serhiy Storchaka <storchaka at gmail.com>
date: 2018-06-10T10:28:01+03:00
summary:

Remove unneeded PyErr_Occurred() check in os_lseek_impl() (GH-7557)

This call became unneeded after the posix module was converted to the
Argument Clinic in 2f93635d342a500053e97c9c7c30f1eaf11fc3ac and should
have been removed as part of that change.

files:
M Modules/posixmodule.c

diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index a9b3917188c6..247af1b6ce91 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -8238,9 +8238,6 @@ os_lseek_impl(PyObject *module, int fd, Py_off_t position, int how)
     }
 #endif /* SEEK_END */
 
-    if (PyErr_Occurred())
-        return -1;
-
     Py_BEGIN_ALLOW_THREADS
     _Py_BEGIN_SUPPRESS_IPH
 #ifdef MS_WINDOWS



More information about the Python-checkins mailing list