Skip to content

Commit bbab367

Browse files
committed
assert(!PyErr_Occurred()) only on success
1 parent 6f05f25 commit bbab367

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/posixmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2616,6 +2616,7 @@ fill_time(PyObject *module, PyObject *v, int s_index, int f_index, int ns_index,
26162616
return -1;
26172617
}
26182618
PyStructSequence_SET_ITEM(v, ns_index, ns_total);
2619+
assert(!PyErr_Occurred());
26192620
res = 0;
26202621
}
26212622
else {
@@ -2637,6 +2638,7 @@ fill_time(PyObject *module, PyObject *v, int s_index, int f_index, int ns_index,
26372638
goto exit;
26382639
}
26392640
PyStructSequence_SET_ITEM(v, ns_index, ns_total);
2641+
assert(!PyErr_Occurred());
26402642
res = 0;
26412643

26422644
exit:
@@ -2646,7 +2648,6 @@ fill_time(PyObject *module, PyObject *v, int s_index, int f_index, int ns_index,
26462648
}
26472649
}
26482650

2649-
assert(!PyErr_Occurred());
26502651
return res;
26512652
#undef S_TO_NS
26522653
}

0 commit comments

Comments
 (0)