From ccfdb695bc36f8684c053e79fa0db73e292c340f Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 4 Jan 2019 09:26:57 +0100 Subject: [PATCH] memory (sqlite): minor comment move --- sat/memory/sqlite.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sat/memory/sqlite.py b/sat/memory/sqlite.py index 05da8933..56faae31 100644 --- a/sat/memory/sqlite.py +++ b/sat/memory/sqlite.py @@ -127,12 +127,13 @@ NOT_IN_EXTRA = ('stanza_id', 'received_timestamp', 'update_uid') # keys which ar class ConnectionPool(adbapi.ConnectionPool): - # Workaround to avoid IntegrityError causing (i)pdb to be launched in debug mode def _runQuery(self, trans, *args, **kw): retry = kw.pop('query_retry', 6) try: trans.execute(*args, **kw) except sqlite3.IntegrityError as e: + # Workaround to avoid IntegrityError causing (i)pdb to be + # launched in debug mode raise failure.Failure(e) except Exception as e: # FIXME: in case of error, we retry a couple of times