X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_policy_module%2Fcore%2Fdatabase.py;h=db8cf285fb5347632929dc18ad13569cd32174cd;hb=refs%2Fchanges%2F68%2F7168%2F1;hp=a39f982c85ba9afac09a82a4a4af31d070659181;hpb=c15e564b6fa2b11cc2db0c710c985fb46e0bdad6;p=osm%2FPOL.git diff --git a/osm_policy_module/core/database.py b/osm_policy_module/core/database.py index a39f982..db8cf28 100644 --- a/osm_policy_module/core/database.py +++ b/osm_policy_module/core/database.py @@ -71,12 +71,9 @@ class ScalingAlarm(BaseModel): class DatabaseManager: def create_tables(self): - try: - db.connect() - db.create_tables([ScalingGroup, ScalingPolicy, ScalingCriteria, ScalingAlarm]) - db.close() - except Exception: - log.exception("Error creating tables: ") + db.connect() + db.create_tables([ScalingGroup, ScalingPolicy, ScalingCriteria, ScalingAlarm]) + db.close() def get_alarm(self, alarm_uuid: str): return ScalingAlarm.select().where(ScalingAlarm.alarm_uuid == alarm_uuid).get()