From: Daniele Varrazzo Date: Sat, 11 Jun 2022 08:46:01 +0000 (+0200) Subject: refactor(copy) use already looked-up pgconn instead of the connection one X-Git-Tag: 3.0.15~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac0bdfe28f3bbc50fc7e4ec8a86f6458fbd46afb;p=thirdparty%2Fpsycopg.git refactor(copy) use already looked-up pgconn instead of the connection one Left out of previous refactoring. --- diff --git a/psycopg/psycopg/copy.py b/psycopg/psycopg/copy.py index 1079f6256..4e78cd957 100644 --- a/psycopg/psycopg/copy.py +++ b/psycopg/psycopg/copy.py @@ -170,7 +170,7 @@ class BaseCopy(Generic[ConnectionType]): if not exc: return - if self.connection.pgconn.transaction_status != pq.TransactionStatus.ACTIVE: + if self._pgconn.transaction_status != pq.TransactionStatus.ACTIVE: # The server has already finished to send copy data. The connection # is already in a good state. return