diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-12-28 03:32:58 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2019-01-21 02:00:04 +0000 |
commit | 43d779966b5eeb5db210d58e07d787fae89bcc4f (patch) | |
tree | f79f92c801df7a8b1aa233beaa788c27b4571ef7 | |
parent | 003fc6dde1f4cb312442874b743b91c4888372cc (diff) | |
download | psycopg2-43d779966b5eeb5db210d58e07d787fae89bcc4f.tar.gz |
Avoid using PyErr_BadInternalCall as the static checker doesn't get it
-rw-r--r-- | psycopg/bytes_format.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |