Database: other exceptions

This commit is contained in:
Dominik Pantůček 2025-07-12 17:45:06 +02:00
parent 557d36cac3
commit 38838692c6

View file

@ -3,6 +3,8 @@
import psycopg2
from contextlib import closing
import time
import logging
logger = logging.getLogger(__name__)
class Database:
"""self-reconnecting database object"""
@ -55,6 +57,8 @@ class Database:
time.sleep(1)
cur = self.db_conn.cursor() #how ugly is this?
return self._execute(cur, query, attrs, level+1)
except Exception as ex:
logger.debug("_execute exception: %s", ex)
def commit(self):
"""passes commit to db"""