mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-03-03 23:55:46 +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(
|
errortext = PQresultErrorField(
|
||||||
((cursorObject *)curs)->pgres, (Py_intptr_t) closure);
|
((cursorObject *)curs)->pgres, (Py_intptr_t) closure);
|
||||||
if (errortext) {
|
if (errortext) {
|
||||||
// FIXME: does this need to use conn_text_from_chars()?
|
rv = conn_text_from_chars(((cursorObject *)curs)->conn, errortext);
|
||||||
rv = PyString_FromString(errortext);
|
|
||||||
}
|
}
|
||||||
exit:
|
exit:
|
||||||
if (!rv) {
|
if (!rv) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user