summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--psycopg/bytes_format.c2
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);