Avoid using PyErr_BadInternalCall as the static checker doesn't get it

This commit is contained in:
Daniele Varrazzo 2018-12-28 03:32:58 +01:00
parent 003fc6dde1
commit 43d779966b

View File

@ -111,7 +111,7 @@ Bytes_Format(PyObject *format, PyObject *args)
PyObject *result;
PyObject *dict = NULL;
if (format == NULL || !Bytes_Check(format) || args == NULL) {
PyErr_BadInternalCall();
PyErr_SetString(PyExc_SystemError, "bad argument to internal function");
return NULL;
}
fmt = Bytes_AS_STRING(format);