From a271eb10b04d46e7b7f0d3db46f30e126a005b08 Mon Sep 17 00:00:00 2001 From: Daniel Fortunov Date: Mon, 23 Nov 2020 08:08:46 +0000 Subject: [PATCH] Remove obsolete references to Transaction.Rollback Rollback exception is no longer available on the Transaction object. --- psycopg3/psycopg3/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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") -- 2.47.2