Skip to content

Commit e4a84b9

Browse files
committed
Fixed error message on Binary(str) in Python 3
1 parent be22dfb commit e4a84b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

psycopg/adapter_binary.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ binary_quote(binaryObject *self)
8888
PQfreemem(to);
8989
}
9090

91-
/* if the wrapped object is not a string or a buffer, this is an error */
91+
/* if the wrapped object is not bytes or a buffer, this is an error */
9292
else {
93-
PyErr_SetString(PyExc_TypeError, "can't escape non-string object");
93+
PyErr_SetString(PyExc_TypeError, "can't escape non-bytes object");
9494
return NULL;
9595
}
9696

0 commit comments

Comments
 (0)