mirror of
https://github.com/python/cpython
synced 2026-09-29 08:45:29 +03:00
When PyInt_FromLong() returns NULL, you do not need to check
PyErr_Occurred(). Removed the extra test and setting of a bogus exception.
This commit is contained in:
parent
d35509a82d
commit
676940b497
1 changed files with 2 additions and 4 deletions
|
|
@ -414,11 +414,9 @@ readinst(char *buf, int buf_size, PyObject *meth)
|
|||
PyObject *str = NULL;
|
||||
int len = -1;
|
||||
|
||||
if ((bytes = PyInt_FromLong(buf_size)) == NULL) {
|
||||
if (!PyErr_Occurred())
|
||||
PyErr_SetNone(PyExc_EOFError);
|
||||
if ((bytes = PyInt_FromLong(buf_size)) == NULL)
|
||||
goto finally;
|
||||
}
|
||||
|
||||
if ((arg = PyTuple_New(1)) == NULL)
|
||||
goto finally;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue