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.1~44^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14737ff19324f32baa30d9fc38edbb3ae1fa37a6;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 a93ff8751..ffa5067ef 100644 --- a/psycopg/psycopg/copy.py +++ b/psycopg/psycopg/copy.py @@ -178,7 +178,7 @@ class BaseCopy(Generic[ConnectionType]): if not exc: return - if self.connection.pgconn.transaction_status != ACTIVE: + if self._pgconn.transaction_status != ACTIVE: # The server has already finished to send copy data. The connection # is already in a good state. return