Убрал лишние поля у класса. Выделил важные сообщения разными цветами
This commit is contained in:
20
db/db.py
20
db/db.py
@@ -48,8 +48,8 @@ class Database:
|
||||
)
|
||||
)
|
||||
self.con.commit()
|
||||
except Exception as e:
|
||||
logger.debug(e)
|
||||
except Exception:
|
||||
pass
|
||||
if not is_updated:
|
||||
logging.info("База данных устарела. Рекомендуем обновить с помощью флага -i [--init-db]")
|
||||
|
||||
@@ -72,8 +72,8 @@ class Database:
|
||||
)
|
||||
)
|
||||
self.con.commit()
|
||||
except Exception as e:
|
||||
logger.debug(e)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def insert_tags(self, tags: list[Tag]):
|
||||
@@ -82,8 +82,8 @@ class Database:
|
||||
try:
|
||||
cur.execute("INSERT INTO tags VALUES(?, ?)",(tag.id,tag.title))
|
||||
self.con.commit()
|
||||
except Exception as e:
|
||||
logger.debug(e)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def insert_vetro_projects(self, vetro_projects: list[VetroProject]):
|
||||
@@ -92,8 +92,8 @@ class Database:
|
||||
try:
|
||||
cur.execute("INSERT INTO vetro_projects VALUES(?, ?)", (vetro_project.id, vetro_project.title))
|
||||
self.con.commit()
|
||||
except Exception as e:
|
||||
logger.debug(e)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def insert_activity_types(self, activity_types: list[ActivityType]):
|
||||
cur = self.con.cursor()
|
||||
@@ -101,5 +101,5 @@ class Database:
|
||||
try:
|
||||
cur.execute("INSERT INTO activity_types VALUES(?, ?)", (activity_type.id, activity_type.title))
|
||||
self.con.commit()
|
||||
except Exception as e:
|
||||
logger.debug(e)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user