mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-03-03 07:45:45 +03:00
Decode Diagnostics result on Python 3
This commit is contained in:
parent
70b756b8c7
commit
819a551d01
|
@ -67,8 +67,7 @@ psyco_diagnostics_get_field(diagnosticsObject *self, void *closure)
|
|||
errortext = PQresultErrorField(
|
||||
((cursorObject *)curs)->pgres, (Py_intptr_t) closure);
|
||||
if (errortext) {
|
||||
// FIXME: does this need to use conn_text_from_chars()?
|
||||
rv = PyString_FromString(errortext);
|
||||
rv = conn_text_from_chars(((cursorObject *)curs)->conn, errortext);
|
||||
}
|
||||
exit:
|
||||
if (!rv) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user