mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2025-12-06 07:12:04 +01:00
Merge branch 'develop' into bugfix/service-colorama
This commit is contained in:
commit
ce3bec23d4
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue