Bug report
Here the first possible error will be overwritten by the second one:
|
termsize = PyStructSequence_New((PyTypeObject *)TerminalSizeType); |
|
if (termsize == NULL) |
|
return NULL; |
|
PyStructSequence_SET_ITEM(termsize, 0, PyLong_FromLong(columns)); |
|
PyStructSequence_SET_ITEM(termsize, 1, PyLong_FromLong(lines)); |
|
if (PyErr_Occurred()) { |
|
Py_DECREF(termsize); |
|
return NULL; |
|
} |
|
return termsize; |
Linked PRs
Bug report
Here the first possible error will be overwritten by the second one:
cpython/Modules/posixmodule.c
Lines 14981 to 14990 in 3cdfdc0
Linked PRs
os_get_terminal_size_implinposixmodule#116521os_get_terminal_size_implinposixmodule(GH-116521) #116539os_get_terminal_size_implinposixmodule(GH-116521) #116540