Merge branch 'develop' into enh/descr-csv

This commit is contained in:
Bastian Schroll 2025-11-26 08:11:42 +01:00 committed by GitHub
commit d016f264d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -57,7 +57,10 @@ class BoswatchPlugin(PluginBase):
if self.cursor.fetchone() is None:
with open('init_db.sql') as f:
for stmnt in f.read().split(';'):
self.cursor.execute(stmnt)
# Change: Remove whitespace and check for empty strings
clean_stmnt = stmnt.strip()
if clean_stmnt: # only if the string is not empty
self.cursor.execute(clean_stmnt)
self.connection.commit()
self.cursor.close()