Skip to content

Commit

Permalink
Allow get_transaction_status on closed connections
Browse files Browse the repository at this point in the history
It's a local operation and the libpq functions has a NULL guard.
  • Loading branch information
dvarrazzo committed Apr 5, 2014
1 parent 9036299 commit a31c1a1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ What's new in psycopg 2.5.3
- Don't segfault using poorly defined cursor subclasses which forgot to call
the superclass init (:ticket:`#195`).
- Fixed possible segfault in named cursors creation.
- It is now possible to call `get_transaction_status()` on closed connections.
- Fixed debug build on Windows, thanks to James Emerton.


Expand Down
2 changes: 0 additions & 2 deletions psycopg/connection_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,6 @@ psyco_conn_set_client_encoding(connectionObject *self, PyObject *args)
static PyObject *
psyco_conn_get_transaction_status(connectionObject *self)
{
EXC_IF_CONN_CLOSED(self);

return PyInt_FromLong((long)PQtransactionStatus(self->pgconn));
}

Expand Down

0 comments on commit a31c1a1

Please sign in to comment.