partitioncloud-server/scripts/hooks/utils.py

9 lines
226 B
Python
Raw Normal View History

2023-11-19 15:52:48 +01:00
import sqlite3
def run_sqlite_command(cmd):
"""Run a command against the database"""
con = sqlite3.connect("instance/partitioncloud.sqlite")
2023-11-19 15:52:48 +01:00
cur = con.cursor()
cur.execute(cmd)
con.commit()
con.close()