From 43d779966b5eeb5db210d58e07d787fae89bcc4f Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Fri, 28 Dec 2018 03:32:58 +0100 Subject: Avoid using PyErr_BadInternalCall as the static checker doesn't get it --- psycopg/bytes_format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psycopg/bytes_format.c b/psycopg/bytes_format.c index 991f760..cd06b1c 100644 --- a/psycopg/bytes_format.c +++ b/psycopg/bytes_format.c @@ -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); -- cgit v1.2.1