We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58550c0 commit c815882Copy full SHA for c815882
Modules/_struct.c
@@ -1778,11 +1778,11 @@ s_init(PyStructObject *self, PyObject *format)
1778
Py_INCREF(format);
1779
}
1780
if (!PyBytes_Check(format)) {
1781
- Py_DECREF(format);
1782
PyErr_Format(PyExc_TypeError,
1783
"Struct() argument 1 must be a str or bytes object, "
1784
"not %T",
1785
format);
+ Py_DECREF(format);
1786
return -1;
1787
1788
Py_SETREF(self->s_format, format);
0 commit comments