From: Daniel Fortunov Date: Mon, 23 Nov 2020 08:08:46 +0000 (+0000) Subject: Remove obsolete references to Transaction.Rollback X-Git-Tag: 3.0.dev0~321 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a271eb10b04d46e7b7f0d3db46f30e126a005b08;p=thirdparty%2Fpsycopg.git Remove obsolete references to Transaction.Rollback Rollback exception is no longer available on the Transaction object. --- diff --git a/psycopg3/psycopg3/connection.py b/psycopg3/psycopg3/connection.py index 0d8bfe4c8..df6f264ca 100644 --- a/psycopg3/psycopg3/connection.py +++ b/psycopg3/psycopg3/connection.py @@ -313,7 +313,7 @@ class Connection(BaseConnection): if self._savepoints: raise e.ProgrammingError( "Explicit rollback() forbidden within a Transaction " - "context. (Either raise Transaction.Rollback() or allow " + "context. (Either raise Rollback() or allow " "an exception to propagate out of the context.)" ) if self.pgconn.transaction_status == TransactionStatus.IDLE: @@ -472,7 +472,7 @@ class AsyncConnection(BaseConnection): if self._savepoints: raise e.ProgrammingError( "Explicit rollback() forbidden within a Transaction " - "context. (Either raise Transaction.Rollback() or allow " + "context. (Either raise Rollback() or allow " "an exception to propagate out of the context.)" ) await self._exec_command(b"rollback")