mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
parent
47f5e97759
commit
a66c34a6d0
1
NEWS
1
NEWS
|
@ -7,6 +7,7 @@ What's new in psycopg 2.7.2
|
||||||
- Fixed inconsistent state in externally closed connections
|
- Fixed inconsistent state in externally closed connections
|
||||||
(:tickets:`#263, #311, #443`). Was fixed in 2.6.2 but not included in
|
(:tickets:`#263, #311, #443`). Was fixed in 2.6.2 but not included in
|
||||||
2.7 by mistake.
|
2.7 by mistake.
|
||||||
|
- Fixed Python exceptions propagation in green callback (:ticket:`#410`).
|
||||||
- Don't display the password in `connection.dsn` when the connection
|
- Don't display the password in `connection.dsn` when the connection
|
||||||
string is specified as an URI (:ticket:`#528`).
|
string is specified as an URI (:ticket:`#528`).
|
||||||
- Return objects with timezone parsing "infinity" :sql:`timestamptz`
|
- Return objects with timezone parsing "infinity" :sql:`timestamptz`
|
||||||
|
|
|
@ -451,6 +451,10 @@ pq_complete_error(connectionObject *conn, PGresult **pgres, char **error)
|
||||||
else {
|
else {
|
||||||
if (*error != NULL) {
|
if (*error != NULL) {
|
||||||
PyErr_SetString(OperationalError, *error);
|
PyErr_SetString(OperationalError, *error);
|
||||||
|
} else if (PyErr_Occurred()) {
|
||||||
|
/* There was a Python error (e.g. in the callback). Don't clobber
|
||||||
|
* it with an unknown exception. (see #410) */
|
||||||
|
Dprintf("pq_complete_error: forwarding Python exception");
|
||||||
} else {
|
} else {
|
||||||
PyErr_SetString(OperationalError, "unknown error");
|
PyErr_SetString(OperationalError, "unknown error");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user