memory (sqlite): minor comment move

This commit is contained in:
Goffi 2019-01-04 09:26:57 +01:00
commit ccfdb695bc

View file

@ -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