Skip to content

Commit

Permalink
Apply suggession for Python/sysmodule.c
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Bierma <[email protected]>
  • Loading branch information
federicovalenso and ZeroIntensity authored Oct 31, 2024
1 parent 67b9de2 commit 7d0754f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/sysmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2862,6 +2862,8 @@ PyAPI_FUNC(void)
PySys_AddWarnOptionUnicode(PyObject *option)
{
PyThreadState *tstate = _PyThreadState_GET();
_Py_EnsureTstateNotNULL(tstate);
assert(!_PyErr_Occurred(tstate));
if (_PySys_AddWarnOptionWithError(tstate, option) < 0) {
/* No return value, therefore clear error state if possible */
_PyErr_Clear(tstate);
Expand Down

0 comments on commit 7d0754f

Please sign in to comment.