From 9a699e7ae88c50c4a0bedef008d8dcbb922bb72f Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Tue, 14 Aug 2012 19:25:22 +0200 Subject: [PATCH] [entropy.db.exceptions] introduce RestartTransaction exception Exception raised in case the whole transaction has been aborted by the database and caller is kindly required to restart it from the beginning. --- lib/entropy/db/exceptions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/entropy/db/exceptions.py b/lib/entropy/db/exceptions.py index 31d6ca6c2..d07a73872 100644 --- a/lib/entropy/db/exceptions.py +++ b/lib/entropy/db/exceptions.py @@ -68,3 +68,8 @@ class NotSupportedError(Error): .rollback() on a connection that does not support transaction or has transactions turned off. It must be a subclass of DatabaseError. """ + +class RestartTransaction(Error): + """ Exception raised in case the whole transaction has + been aborted by the database and caller is kindly + required to restart it from the beginning. """